Browse Source

refactor: cmake build

master
dnomd343 3 years ago
parent
commit
772f4e0c65
  1. 2
      .gitignore
  2. 6
      CMakeLists.txt
  3. 0
      include/cJSON.h
  4. 0
      include/common.h
  5. 0
      include/network.h
  6. 0
      include/process.h
  7. 16
      src/CMakeLists.txt
  8. 0
      src/cJSON.c
  9. 0
      src/common.c
  10. 0
      src/local.c
  11. 0
      src/network.c
  12. 0
      src/process.c
  13. 0
      src/server.c

2
.gitignore

@ -0,0 +1,2 @@
/bin/
/build/

6
CMakeLists.txt

@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 2.8)
project(shadowsocks-bootstrap)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
add_subdirectory(src)

0
cJSON.h → include/cJSON.h

0
common.h → include/common.h

0
network.h → include/network.h

0
process.h → include/process.h

16
src/CMakeLists.txt

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 2.8)
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(/usr/lib64/glib-2.0/include)
include_directories(/usr/lib/glib-2.0/include)
include_directories(/usr/include/glib-2.0)
aux_source_directory(${PROJECT_SOURCE_DIR}/src SRC)
list(REMOVE_ITEM SRC ${PROJECT_SOURCE_DIR}/src/local.c)
list(REMOVE_ITEM SRC ${PROJECT_SOURCE_DIR}/src/server.c)
add_executable(ss-bootstrap-local local.c ${SRC})
target_link_libraries(ss-bootstrap-local glib-2.0)
add_executable(ss-bootstrap-server server.c ${SRC})
target_link_libraries(ss-bootstrap-server glib-2.0)

0
cJSON.c → src/cJSON.c

0
common.c → src/common.c

0
local.c → src/local.c

0
network.c → src/network.c

0
process.c → src/process.c

0
server.c → src/server.c

Loading…
Cancel
Save