1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 17:39:53 +03:00

Add "vpntest" to CMake

This commit is contained in:
Davide Beatrici 2018-10-08 05:10:54 +02:00
parent ee208dd6f0
commit 97d7f3fb05
2 changed files with 20 additions and 0 deletions

View File

@ -115,6 +115,10 @@ get_target_property(VPNBRIDGE_RUNTIME_OUTPUT_DIRECTORY vpnbridge RUNTIME_OUTPUT_
add_subdirectory(vpncmd)
get_target_property(VPNCMD_RUNTIME_OUTPUT_DIRECTORY vpncmd RUNTIME_OUTPUT_DIRECTORY)
# vpntest
add_subdirectory(vpntest)
get_target_property(VPNTEST_RUNTIME_OUTPUT_DIRECTORY vpntest RUNTIME_OUTPUT_DIRECTORY)
# hamcore.se2 archive file
add_custom_target(hamcore-archive-build
ALL
@ -148,6 +152,12 @@ add_custom_command(TARGET hamcore-archive-build
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/tmp/hamcore.se2 ${VPNCMD_RUNTIME_OUTPUT_DIRECTORY}
)
# Copy hamcore.se2 to vpntest's directory
add_custom_command(TARGET hamcore-archive-build
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/tmp/hamcore.se2 ${VPNTEST_RUNTIME_OUTPUT_DIRECTORY}
)
# Copy "vpnserver" directory to /usr/lib(exec)/softether/, install launch script and systemd service
install(DIRECTORY ${VPNSERVER_RUNTIME_OUTPUT_DIRECTORY}
COMPONENT "vpnserver"

View File

@ -0,0 +1,10 @@
add_executable(vpntest vpntest.c vpntest.h)
set_target_properties(vpntest
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpntest"
LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpntest"
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpntest"
)
target_link_libraries(vpntest cedar mayaqua)