aboutsummaryrefslogtreecommitdiff
path: root/client/libacron/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'client/libacron/CMakeLists.txt')
-rw-r--r--client/libacron/CMakeLists.txt25
1 files changed, 19 insertions, 6 deletions
diff --git a/client/libacron/CMakeLists.txt b/client/libacron/CMakeLists.txt
index b64a299..57ce521 100644
--- a/client/libacron/CMakeLists.txt
+++ b/client/libacron/CMakeLists.txt
@@ -89,19 +89,32 @@ target_link_libraries(ac ${LIBAC_DEPS})
target_include_directories(ac-static PUBLIC ${LIBAC_INCLUDES})
target_link_libraries(ac-static ${LIBAC_DEPS})
+# Apps
+if(WIN32)
+ set(APPS_DEPS ws2_32)
+endif()
+set(APPS_DEPS ${APPS_DEPS} ac)
+
+# apps/helloworld
add_executable(helloworld
apps/helloworld/main.c
apps/helloworld/net.c
apps/helloworld/net.h
)
-if(WIN32)
- set(ACRONC_DEPS ws2_32)
-endif()
-set(ACRONC_DEPS ${ACRON_DEPS} ac)
-target_link_libraries(helloworld ${ACRONC_DEPS})
+target_link_libraries(helloworld ${APPS_DEPS})
target_include_directories(helloworld PUBLIC "${PROJECT_BINARY_DIR}" include/)
-install(TARGETS ac ac-static helloworld
+# apps/acronc
+add_executable(acronc
+ apps/acronc/main.c
+ apps/acronc/common.h
+ apps/acronc/log.h
+ apps/acronc/log.c
+ apps/acronc/handler.h apps/acronc/handler_signal.c apps/acronc/config.c apps/acronc/config.h apps/acronc/client.c apps/acronc/client.h apps/acronc/handler_stdin.c apps/acronc/helpers.c apps/acronc/helpers.h apps/acronc/handler_socket.c apps/acronc/async_dns.c)
+target_link_libraries(acronc ${APPS_DEPS} uv)
+target_include_directories(acronc PUBLIC "${PROJECT_BINARY_DIR}" include/)
+
+install(TARGETS ac ac-static helloworld acronc
EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}