diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 40a1814..4a33eef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,37 +35,30 @@ set(compile_flags ) set(compile_definitions $<$<CONFIG:Debug>:_FORTIFY_SOURCE=2> - LOG_ERROR=1 - LOG_WARNING=1 - LOG_INFO=1 - $<$<CONFIG:Debug>:LOG_DEBUG=1> - $<$<CONFIG:Debug>:LOG_TRACE=0> - $<$<NOT:$<CONFIG:Debug>>:LOG_DEBUG=0> - $<$<NOT:$<CONFIG:Debug>>:LOG_TRACE=0> ) -add_library(timespec OBJECT lib/timespec/timespec.c lib/timespec/timespec.h) -target_compile_options(timespec PRIVATE ${compile_flags}) -target_compile_definitions(timespec PRIVATE ${compile_definitions}) -target_link_options(timespec PRIVATE $<$<CONFIG:Debug>:${common_debug_flags}>) - add_library(common OBJECT + debug.c + debug.h proto.c proto.h proto_io.c proto_io.h + lib/timespec/timespec.c + lib/timespec/timespec.h + lib/optparse/optparse.h ) target_compile_options(common PRIVATE ${compile_flags}) target_compile_definitions(common PRIVATE ${compile_definitions}) target_link_options(common PRIVATE $<$<CONFIG:Debug>:${common_debug_flags}>) -add_executable(server server.c $<TARGET_OBJECTS:common> $<TARGET_OBJECTS:timespec>) +add_executable(server server.c $<TARGET_OBJECTS:common>) target_compile_options(server PRIVATE ${compile_flags}) target_compile_definitions(server PRIVATE ${compile_definitions}) target_link_options(server PRIVATE $<$<CONFIG:Debug>:${common_debug_flags}>) target_include_directories(server PRIVATE . lib) -add_executable(client client.c $<TARGET_OBJECTS:common> $<TARGET_OBJECTS:timespec>) +add_executable(client client.c $<TARGET_OBJECTS:common>) target_compile_options(client PRIVATE ${compile_flags}) target_compile_definitions(client PRIVATE ${compile_definitions}) target_link_options(client PRIVATE $<$<CONFIG:Debug>:${common_debug_flags}>) |