From 8eae88edfec518c89e1813feee3b2a5aea71a8b7 Mon Sep 17 00:00:00 2001 From: lukas-heiligenbrunner Date: Sat, 26 Oct 2019 11:38:24 +0200 Subject: [PATCH] removed install check of systemd --- CMakeLists.txt | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1771baf..b519c13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,29 +86,7 @@ target_link_libraries(iprefresher api logger ${CURL_LIBRARIES}) # INSTALL to SYSTEM # install(TARGETS iprefresher DESTINATION bin) - -pkg_check_modules(SYSTEMD "systemd") -if (SYSTEMD_FOUND AND "${SYSTEMD_SERVICES_INSTALL_DIR}" STREQUAL "") - execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} - --variable=systemdsystemunitdir systemd - OUTPUT_VARIABLE SYSTEMD_SERVICES_INSTALL_DIR) - string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SERVICES_INSTALL_DIR - "${SYSTEMD_SERVICES_INSTALL_DIR}") -elseif (NOT SYSTEMD_FOUND AND SYSTEMD_SERVICES_INSTALL_DIR) - message (FATAL_ERROR "Variable SYSTEMD_SERVICES_INSTALL_DIR is\ - defined, but we can't find systemd using pkg-config") -endif() - -if (SYSTEMD_FOUND) - set(WITH_SYSTEMD "ON") - message(STATUS "systemd services install dir: ${SYSTEMD_SERVICES_INSTALL_DIR}") -else() - set(WITH_SYSTEMD "OFF") -endif (SYSTEMD_FOUND) - -#set(CMAKE_INSTALL_PREFIX /) -message(STATUS ${CMAKE_BINARY_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/iprefresher.service DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}) +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/iprefresher.service DESTINATION /lib/systemd/system) IF (UNIX)