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:
@ -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)
|
||||
|
Reference in New Issue
Block a user