summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-08-23 16:57:50 +0800
committeryangwei <[email protected]>2024-08-23 16:57:50 +0800
commit2ef4c8f3cad74fa4291129c7047a3bfdca5a3861 (patch)
tree3078146a3e89ba71e7ad55a8941f0e527246f3de /src
parentea64461bcc79a6735c16e0299907372d06eb1ddc (diff)
🔧 build(unify SAPP_MODULES ): define depend library in SAPP_MODULES
Diffstat (limited to 'src')
-rw-r--r--src/entry/CMakeLists.txt32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/entry/CMakeLists.txt b/src/entry/CMakeLists.txt
index 66f8e8c..dcaa8ab 100644
--- a/src/entry/CMakeLists.txt
+++ b/src/entry/CMakeLists.txt
@@ -17,13 +17,10 @@ if(CAPTURE_MODE STREQUAL "MARSIO")
endif()
-
if(HASP_ENABLED)
include_directories(/opt/tsg/hasp-tools/include/)
endif()
-
-
add_executable(sapp sapp_main.c)
target_compile_options(sapp PUBLIC ${MEM_POOL_DEFINITIONS})
target_include_directories(sapp PRIVATE ${SYSTEMD_INCLUDE_DIRS})
@@ -34,34 +31,7 @@ if(HASP_ENABLED STREQUAL "ON")
target_link_libraries(sapp ${HASP_TOOLS_LIB})
endif()
-set(SAPP_MODULES timestamp_record md5
- symbol_check MESA_sleep MESA_socket_wrap
- packet_io dealpkt project plugctrl common
- config timer tomlc99_wrap dpdk_ip_hash
- gdev_assistant inline_keepalive ap_bloom libdabloom
- sapp_dev sapp_assistant sapp_metrics
- platform_support cpu_limit timeout token_bucket)
-
-if(LIBEVENT_ENABLED STREQUAL "ON")
- set(SAPP_MODULES ${SAPP_MODULES} libevent-static)
-endif()
-
-if(MEM_POOL STREQUAL "JEMALLOC_STATIC")
- set(SAPP_MODULES ${SAPP_MODULES} libjemalloc-static)
-endif()
-
-if(MEM_POOL STREQUAL "MIMALLOC")
- set(SAPP_MODULES ${SAPP_MODULES} libmimalloc-static)
-endif()
-
target_link_libraries(sapp -Wl,--whole-archive ${SAPP_MODULES} -Wl,--no-whole-archive)
target_link_libraries(sapp ${SAPP_DEPEND_DYN_LIB})
-target_link_libraries(sapp packet_io_pcap)
-if(CAPTURE_MODE STREQUAL "MARSIO")
- target_link_libraries(sapp packet_io_marsio)
-endif()
-
-if(CAPTURE_MODE STREQUAL "TUN")
- target_link_libraries(sapp packet_io_tun)
-endif()
+