aboutsummaryrefslogtreecommitdiff
path: root/client/libacron/CMakeLists.txt
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2022-07-26 17:17:09 -0700
committerTrumeet <yuuta@yuuta.moe>2022-07-26 17:17:09 -0700
commit8b07bf593e54dd876e30d0cb1c7c7226d0d1b1e2 (patch)
treefa39391ea1eef6e87a563ee417ba709a33dae596 /client/libacron/CMakeLists.txt
parent219e4bb54375995fa377a1bcf9601a77cf6f1fee (diff)
downloadacron-8b07bf593e54dd876e30d0cb1c7c7226d0d1b1e2.tar
acron-8b07bf593e54dd876e30d0cb1c7c7226d0d1b1e2.tar.gz
acron-8b07bf593e54dd876e30d0cb1c7c7226d0d1b1e2.tar.bz2
acron-8b07bf593e54dd876e30d0cb1c7c7226d0d1b1e2.zip
feat(acronc): add acronc(1), the Acron cli
Still in early development, Windows support is incomplete. Signed-off-by: Trumeet <yuuta@yuuta.moe>
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}