diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..e34d53ec26b433ec89454c62a969017097360031 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,34 @@ +project(tcpdaemon) +cmake_minimum_required(VERSION 2.8) + +SET(LIBSRC +src/tcpdaemon_lib.c +src/LOGC.c +src/list.c +src/rbtree_ins.c +src/rbtree.c + +) + +add_library(tcpdaemon_s STATIC ${LIBSRC}) +set_target_properties(tcpdaemon_s PROPERTIES OUTPUT_NAME tcpdaemon ) +INSTALL(TARGETS tcpdaemon_s DESTINATION lib) + +add_executable(tcpdaemon src/tcpdaemon_main.c) +target_link_libraries(tcpdaemon tcpdaemon_s dl) +INSTALL(TARGETS tcpdaemon DESTINATION bin) + + +INSTALL(FILES src/tcpdaemon.h DESTINATION include) + +add_subdirectory(test) + +include(InstallRequiredSystemLibraries) + +set(CPACK_PACKAGE_VERSION_MAJOR "1") +set(CPACK_PACKAGE_VERSION_MINOR "0") +set(CPACK_PACKAGE_VERSION_PATCH "0") +set(CPACK_GENERATOR "TGZ") +set(CPACK_PACKAGE_NAME tcpdaemon) +INCLUDE(CPack) + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..05106a14a542bc4497c8d47cf1ea73aab02faa62 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,4 @@ +add_executable(test_main_IOMP test_main_IOMP.c test_callback_http_echo_nonblock.c) +target_link_libraries(test_main_IOMP tcpdaemon_s dl) + +