removed install check of systemd
This commit is contained in:
parent
0d00ab10cf
commit
8eae88edfe
@ -86,29 +86,7 @@ target_link_libraries(iprefresher api logger ${CURL_LIBRARIES})
|
|||||||
|
|
||||||
# INSTALL to SYSTEM #
|
# INSTALL to SYSTEM #
|
||||||
install(TARGETS iprefresher DESTINATION bin)
|
install(TARGETS iprefresher DESTINATION bin)
|
||||||
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/iprefresher.service DESTINATION /lib/systemd/system)
|
||||||
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})
|
|
||||||
|
|
||||||
|
|
||||||
IF (UNIX)
|
IF (UNIX)
|
||||||
|
Loading…
Reference in New Issue
Block a user