From 70f2a43f676cdda5961950a8d9a21e12d34993f8 Mon Sep 17 00:00:00 2001 From: CoiLock Date: Mon, 7 Mar 2016 17:54:07 +0100 Subject: [PATCH] Fixed compilation on systemd > 210 --- CMakeLists.txt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f3941d..a815873 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,8 +56,7 @@ endif() if (SYSTEMD_SUPPORT) INCLUDE(FindPkgConfig) - pkg_search_module(SD_DAEMON REQUIRED libsystemd-daemon) - pkg_search_module(SD_JOURNAL REQUIRED libsystemd-journal) + pkg_search_module(SD REQUIRED libsystemd) endif() if (MSVC) @@ -212,14 +211,11 @@ if(SSL_SUPPORT) endif() if (SYSTEMD_SUPPORT) - target_link_libraries(uhub ${SD_DAEMON_LIBRARIES}) - target_link_libraries(uhub ${SD_JOURNAL_LIBRARIES}) - target_link_libraries(test ${SD_DAEMON_LIBRARIES}) - target_link_libraries(test ${SD_JOURNAL_LIBRARIES}) - target_link_libraries(uhub-passwd ${SD_JOURNAL_LIBRARIES}) - target_link_libraries(uhub-admin ${SD_JOURNAL_LIBRARIES}) - include_directories(${SD_DAEMON_INCLUDE_DIRS}) - include_directories(${SD_JOURNAL_INCLUDE_DIRS}) + target_link_libraries(uhub ${SD_LIBRARIES}) + target_link_libraries(test ${SD_LIBRARIES}) + target_link_libraries(uhub-passwd ${SD_LIBRARIES}) + target_link_libraries(uhub-admin ${SD_LIBRARIES}) + include_directories(${SD_INCLUDE_DIRS}) add_definitions(-DSYSTEMD) endif()