2018-10-24 20:23:07 +03:00
|
|
|
set(VPNCLIENT_SOURCES vpncsvc.c vpncsvc.h)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(VPNCLIENT_SOURCES ${VPNCLIENT_SOURCES} vpnclient.rc)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable(vpnclient ${VPNCLIENT_SOURCES})
|
2018-07-26 07:44:19 +03:00
|
|
|
|
|
|
|
set_target_properties(vpnclient
|
|
|
|
PROPERTIES
|
2018-10-18 03:02:17 +03:00
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
2018-07-26 07:44:19 +03:00
|
|
|
)
|
|
|
|
|
2018-11-18 06:18:42 +03:00
|
|
|
if(WIN32)
|
|
|
|
set_target_properties(vpnclient
|
|
|
|
PROPERTIES
|
|
|
|
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-07-26 07:44:19 +03:00
|
|
|
target_link_libraries(vpnclient cedar mayaqua)
|
2018-10-18 03:02:17 +03:00
|
|
|
|
2018-10-24 20:23:07 +03:00
|
|
|
if(UNIX)
|
|
|
|
# Copy binary and "hamcore.se2" to /usr/lib(exec)/softether/, install launch script and systemd service
|
|
|
|
install(TARGETS vpnclient
|
|
|
|
COMPONENT "vpnclient"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpnclient"
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
|
|
|
)
|
2018-10-18 03:02:17 +03:00
|
|
|
|
2018-10-24 20:23:07 +03:00
|
|
|
install(FILES "${BUILD_DIRECTORY}/hamcore.se2"
|
2018-10-22 08:55:12 +03:00
|
|
|
COMPONENT "vpnclient"
|
2018-10-24 20:23:07 +03:00
|
|
|
DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpnclient"
|
2018-10-22 08:55:12 +03:00
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
|
|
)
|
2018-10-24 20:23:07 +03:00
|
|
|
|
|
|
|
install_wrapper_script("vpnclient" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient")
|
|
|
|
if(EXISTS "/lib/systemd/system")
|
2018-11-19 02:13:59 +03:00
|
|
|
configure_file(${TOP_DIRECTORY}/systemd/softether-vpnclient.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service)
|
2018-10-24 20:23:07 +03:00
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service
|
|
|
|
COMPONENT "vpnclient"
|
|
|
|
DESTINATION "/lib/systemd/system"
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
|
|
)
|
|
|
|
endif()
|
2018-10-22 08:55:12 +03:00
|
|
|
endif()
|