2018-11-27 07:26:21 +03:00
|
|
|
set(COMPONENT_NAME "Command Line Management Utility")
|
|
|
|
set(COMPONENT_INTERNAL_NAME "vpncmd")
|
2018-10-24 20:23:07 +03:00
|
|
|
|
2018-11-27 07:26:21 +03:00
|
|
|
add_executable(vpncmd vpncmd.c)
|
2018-07-26 07:44:19 +03:00
|
|
|
|
|
|
|
set_target_properties(vpncmd
|
|
|
|
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(vpncmd
|
|
|
|
PROPERTIES
|
|
|
|
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
|
|
|
)
|
2018-11-27 07:26:21 +03:00
|
|
|
|
|
|
|
get_filename_component(COMPONENT_FILE_NAME vpncmd NAME)
|
|
|
|
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
|
|
|
|
|
2020-07-20 19:31:41 +03:00
|
|
|
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_CURRENT_BINARY_DIR}/ver.rc")
|
|
|
|
target_sources(vpncmd PRIVATE "vpncmd.rc" "${CMAKE_CURRENT_BINARY_DIR}/ver.rc")
|
2020-07-25 23:46:44 +03:00
|
|
|
|
|
|
|
if(${COMPILER_ARCHITECTURE} STREQUAL "x64")
|
|
|
|
target_sources(vpncmd PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x64_user.manifest")
|
|
|
|
else()
|
|
|
|
target_sources(vpncmd PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x86_user.manifest")
|
|
|
|
endif()
|
2018-11-18 06:18:42 +03:00
|
|
|
endif()
|
|
|
|
|
2018-07-26 07:44:19 +03:00
|
|
|
target_link_libraries(vpncmd 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
|
|
|
|
install(TARGETS vpncmd
|
|
|
|
COMPONENT "vpncmd"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpncmd"
|
|
|
|
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"
|
|
|
|
COMPONENT "vpncmd"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpncmd"
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
|
|
)
|
2018-10-18 03:02:17 +03:00
|
|
|
|
2020-06-30 06:04:35 +03:00
|
|
|
install_wrapper_script("vpncmd")
|
2018-10-24 20:23:07 +03:00
|
|
|
endif()
|