summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortongzongzhen <[email protected]>2024-07-10 17:44:26 +0800
committertongzongzhen <[email protected]>2024-07-10 17:44:26 +0800
commitd6210a56933597a4f479e0ecd5ed49ed2c7f079b (patch)
tree2ccdcdf567be929e28010c1b8c3bc1769c3cabd0 /test
parent9c989c18759903f09b155d86311fdecc36b15d42 (diff)
fix
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f5a5167..9eefb17 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,6 +1,3 @@
-include_directories(${CMAKE_SOURCE_DIR}/support/mpack)
-include_directories(${CMAKE_SOURCE_DIR}/include)
-
set(DP_TRACE_TELEMETRY_SOURCES
${CMAKE_SOURCE_DIR}/src/config.c
${CMAKE_SOURCE_DIR}/src/job_ctx.c
@@ -13,4 +10,9 @@ set(DP_TRACE_TELEMETRY_SOURCES
${CMAKE_SOURCE_DIR}/support/mpack/mpack.c)
add_executable(cmocka_test cmocka_test.c ${DP_TRACE_TELEMETRY_SOURCES})
-target_link_libraries(cmocka_test libpcapng libmarsio maatframe MESA_prof_load libevent-static rdkafka libcmocka libzlog libcjson uuid pthread pcap)
+
+target_include_directories(cmocka_test PRIVATE ${CMAKE_SOURCE_DIR}/support/mpack ${RDKAFKA_INCLUDE_DIRS})
+target_include_directories(cmocka_test PRIVATE ${CMAKE_SOURCE_DIR}/include)
+target_link_directories(cmocka_test PRIVATE ${RDKAFKA_LIBRARY_DIRS})
+
+target_link_libraries(cmocka_test libpcapng libmarsio maatframe MESA_prof_load libevent-static ${RDKAFKA_LIBRARIES} libcmocka libzlog libcjson uuid pthread pcap)