From 41c2edac3417dcfadc9805a2b98517a06be6eaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gordan=20Marku=C5=A1?= Date: Fri, 16 Jun 2017 07:39:25 +0200 Subject: cmake: fix unit tests compilation with systemd (#17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By enabling the WITH_SYSTEMD and WITH_DLT_UNIT_TESTS cmake flags the build will fail with an error due to a linking issue: ../src/daemon/libdlt_daemon.so: undefined reference to `sd_booted' collect2: error: ld returned 1 exit status Signed-off-by: Gordan Markuš --- src/daemon/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index cec9dc7..83d4302 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -32,7 +32,7 @@ install(TARGETS dlt-daemon COMPONENT base) if (WITH_DLT_UNIT_TESTS) - add_library(dlt_daemon ${dlt_daemon_SRCS}) + add_library(dlt_daemon ${dlt_daemon_SRCS} ${systemd_SRCS}) target_link_libraries(dlt_daemon rt ${CMAKE_THREAD_LIBS_INIT}) install(TARGETS dlt_daemon RUNTIME DESTINATION bin -- cgit v1.2.1