summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/monkey/mk_bin/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'fluent-bit/lib/monkey/mk_bin/CMakeLists.txt')
-rw-r--r--fluent-bit/lib/monkey/mk_bin/CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/fluent-bit/lib/monkey/mk_bin/CMakeLists.txt b/fluent-bit/lib/monkey/mk_bin/CMakeLists.txt
new file mode 100644
index 000000000..b3edc2e92
--- /dev/null
+++ b/fluent-bit/lib/monkey/mk_bin/CMakeLists.txt
@@ -0,0 +1,21 @@
+set(src
+ monkey.c
+ mk_signals.c
+ )
+
+add_executable(monkey-bin ${src})
+target_link_libraries(monkey-bin monkey-core-static)
+set_target_properties(monkey-bin PROPERTIES OUTPUT_NAME monkey)
+
+if(MK_BUILD_LOCAL)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../${CMAKE_CURRENT_BINARY_DIR}/")
+else()
+ install(TARGETS monkey-bin RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_SBINDIR})
+ configure_file (
+ "${CMAKE_CURRENT_SOURCE_DIR}/systemd.in"
+ "${PROJECT_SOURCE_DIR}/monkey.service"
+ )
+ if(SYSTEMD_DIR)
+ install(FILES ${PROJECT_SOURCE_DIR}/monkey.service DESTINATION ${SYSTEMD_DIR})
+ endif()
+endif()