mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-26 03:19:52 +03:00
Merge PR #1024: Make install dir for unit files configurable
This commit is contained in:
commit
7829fe2c59
@ -41,6 +41,9 @@ if(UNIX)
|
|||||||
|
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
Check_Include_File(sys/auxv.h HAVE_SYS_AUXV)
|
Check_Include_File(sys/auxv.h HAVE_SYS_AUXV)
|
||||||
|
if(EXISTS "/lib/systemd/system")
|
||||||
|
set(CMAKE_INSTALL_SYSTEMD_UNITDIR "/lib/systemd/system" CACHE STRING "Where to install systemd unit files")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file("${TOP_DIRECTORY}/AUTHORS.TXT" "${TOP_DIRECTORY}/src/bin/hamcore/authors.txt" COPYONLY)
|
configure_file("${TOP_DIRECTORY}/AUTHORS.TXT" "${TOP_DIRECTORY}/src/bin/hamcore/authors.txt" COPYONLY)
|
||||||
|
@ -40,11 +40,11 @@ if(UNIX)
|
|||||||
)
|
)
|
||||||
|
|
||||||
install_wrapper_script("vpnbridge" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnbridge/vpnbridge")
|
install_wrapper_script("vpnbridge" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnbridge/vpnbridge")
|
||||||
if(EXISTS "/lib/systemd/system")
|
if(NOT "${CMAKE_INSTALL_SYSTEMD_UNITDIR}" STREQUAL "")
|
||||||
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnbridge.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service)
|
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnbridge.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service
|
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service
|
||||||
COMPONENT "vpnbridge"
|
COMPONENT "vpnbridge"
|
||||||
DESTINATION "/lib/systemd/system"
|
DESTINATION ${CMAKE_INSTALL_SYSTEMD_UNITDIR}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -40,11 +40,11 @@ if(UNIX)
|
|||||||
)
|
)
|
||||||
|
|
||||||
install_wrapper_script("vpnclient" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient")
|
install_wrapper_script("vpnclient" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient")
|
||||||
if(EXISTS "/lib/systemd/system")
|
if(NOT "${CMAKE_INSTALL_SYSTEMD_UNITDIR}" STREQUAL "")
|
||||||
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnclient.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service)
|
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnclient.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service
|
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service
|
||||||
COMPONENT "vpnclient"
|
COMPONENT "vpnclient"
|
||||||
DESTINATION "/lib/systemd/system"
|
DESTINATION ${CMAKE_INSTALL_SYSTEMD_UNITDIR}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -40,11 +40,11 @@ if(UNIX)
|
|||||||
)
|
)
|
||||||
|
|
||||||
install_wrapper_script("vpnserver" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnserver/vpnserver")
|
install_wrapper_script("vpnserver" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnserver/vpnserver")
|
||||||
if(EXISTS "/lib/systemd/system")
|
if(NOT "${CMAKE_INSTALL_SYSTEMD_UNITDIR}" STREQUAL "")
|
||||||
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnserver.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service)
|
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnserver.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service
|
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service
|
||||||
COMPONENT "vpnserver"
|
COMPONENT "vpnserver"
|
||||||
DESTINATION "/lib/systemd/system"
|
DESTINATION ${CMAKE_INSTALL_SYSTEMD_UNITDIR}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user