mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
CMake: build vpndrvinst
This commit is contained in:
parent
755e09e5c1
commit
c084ce30f9
@ -155,6 +155,10 @@ if(WIN32)
|
|||||||
add_subdirectory(PenCore)
|
add_subdirectory(PenCore)
|
||||||
add_dependencies(hamcore-archive-build PenCore)
|
add_dependencies(hamcore-archive-build PenCore)
|
||||||
|
|
||||||
|
# vpndrvinst
|
||||||
|
add_subdirectory(vpndrvinst)
|
||||||
|
add_dependencies(hamcore-archive-build vpndrvinst)
|
||||||
|
|
||||||
# vpnsmgr
|
# vpnsmgr
|
||||||
add_subdirectory(vpnsmgr)
|
add_subdirectory(vpnsmgr)
|
||||||
|
|
||||||
|
33
src/vpndrvinst/CMakeLists.txt
Normal file
33
src/vpndrvinst/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
if(NOT WIN32)
|
||||||
|
message(FATAL_ERROR "VPN Driver Installer is available only for Windows.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(COMPONENT_NAME "Driver Installer")
|
||||||
|
set(COMPONENT_INTERNAL_NAME "vpndrvinst")
|
||||||
|
|
||||||
|
add_executable(vpndrvinst WIN32 vpndrvinst.c vpndrvinst.h)
|
||||||
|
|
||||||
|
get_filename_component(COMPONENT_FILE_NAME vpndrvinst NAME)
|
||||||
|
set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe")
|
||||||
|
|
||||||
|
configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_CURRENT_BINARY_DIR}/ver.rc")
|
||||||
|
target_sources(vpndrvinst PRIVATE "vpndrvinst.rc" "${CMAKE_CURRENT_BINARY_DIR}/ver.rc")
|
||||||
|
|
||||||
|
# Fixes manifest authoring error c1010001
|
||||||
|
set_target_properties(vpndrvinst PROPERTIES LINK_FLAGS "/MANIFESTUAC:level='requireAdministrator'")
|
||||||
|
|
||||||
|
if(${COMPILER_ARCHITECTURE} STREQUAL "x64")
|
||||||
|
target_sources(vpndrvinst PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x64_admin.manifest")
|
||||||
|
else()
|
||||||
|
target_sources(vpndrvinst PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x86_admin.manifest")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(vpndrvinst
|
||||||
|
PROPERTIES
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore"
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore"
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore"
|
||||||
|
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(vpndrvinst cedar mayaqua)
|
Loading…
Reference in New Issue
Block a user