1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-12 02:34:59 +03:00

CMake: build targets with versioning info on Windows

This commit is contained in:
Davide Beatrici
2018-11-27 05:26:21 +01:00
parent 0642427080
commit 6903f9b89f
9 changed files with 93 additions and 62 deletions

View File

@ -1,10 +1,7 @@
set(VPNSERVER_SOURCES vpnserver.c)
set(COMPONENT_NAME "Server")
set(COMPONENT_INTERNAL_NAME "vpnserver")
if(WIN32)
set(VPNSERVER_SOURCES ${VPNSERVER_SOURCES} vpnserver.rc)
endif()
add_executable(vpnserver ${VPNSERVER_SOURCES})
add_executable(vpnserver vpnserver.c)
set_target_properties(vpnserver
PROPERTIES
@ -18,6 +15,12 @@ if(WIN32)
PROPERTIES
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
)
get_filename_component(COMPONENT_FILE_NAME vpnserver NAME)
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnserver.rc")
target_sources(vpnserver PRIVATE vpnserver.rc "${CMAKE_BINARY_DIR}/VerScript/vpnserver.rc")
endif()
target_link_libraries(vpnserver cedar mayaqua)