From 4c4cc967ad46abae60f2f9bf5e47b65e8bcbb4b1 Mon Sep 17 00:00:00 2001 From: Jiri Popek Date: Thu, 7 Feb 2019 12:02:51 +0100 Subject: Fix linking problem with tests when systemd enabled (#103) Change-Id: Ide7c91a9f3a182c4bc2f91613874b0ef3feca648 --- tests/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 56a21b7..c56bb22 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -20,8 +20,8 @@ endif() set(DLT_LIBRARIES ${LIBRARIES} dlt) set(DLT_DAEMON_LIBRARIES ${LIBRARIES} dlt_daemon) -if(WITH_SYSTEMD OR WITH_SYSTEMD_WATCHDOG) - set(DLT_DAEMON_LIBRARIES ${DLT_DAEMON_LIBRARIES} systemd) +if(WITH_SYSTEMD OR WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD_JOURNAL) + add_definitions( -DSD_EXPORT_SYMBOLS ) endif() add_executable(gtest_dlt_common gtest_dlt_common.cpp) @@ -30,9 +30,9 @@ add_executable(gtest_dlt_daemon_common gtest_dlt_daemon_common.cpp ../src/daemon add_executable(dlt_test_receiver dlt_test_receiver.c) add_executable(dlt_env_ll_unit_test dlt_env_ll_unit_test.cpp) add_executable(dlt-test-preregister-context dlt-test-preregister-context.c) -add_executable(gtest_dlt_daemon_gateway gtest_dlt_daemon_gateway.cpp) -add_executable(gtest_dlt_daemon_event_handler gtest_dlt_daemon_event_handler.cpp) -add_executable(gtest_dlt_daemon_offline_log gtest_dlt_daemon_offline_log.cpp) +add_executable(gtest_dlt_daemon_gateway gtest_dlt_daemon_gateway.cpp ${systemd_SRCS}) +add_executable(gtest_dlt_daemon_event_handler gtest_dlt_daemon_event_handler.cpp ${systemd_SRCS}) +add_executable(gtest_dlt_daemon_offline_log gtest_dlt_daemon_offline_log.cpp ${systemd_SRCS}) target_link_libraries(gtest_dlt_common ${DLT_LIBRARIES}) target_link_libraries(gtest_dlt_user ${DLT_LIBRARIES}) target_link_libraries(gtest_dlt_daemon_common ${DLT_LIBRARIES}) -- cgit v1.2.1