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()