|
|
|
@ -25,8 +25,6 @@ add_executable(${PROJECT_NAME} WIN32
|
|
|
|
|
viewlog.c
|
|
|
|
|
res/openvpn-gui-res.rc)
|
|
|
|
|
|
|
|
|
|
configure_file(config-msvc.h config.h COPYONLY)
|
|
|
|
|
|
|
|
|
|
find_package(OpenSSL REQUIRED)
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} OpenSSL::SSL
|
|
|
|
|
Wtsapi32.lib
|
|
|
|
@ -48,6 +46,17 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
|
|
|
|
set(CMAKE_RC_FLAGS "/D \"HAVE_CONFIG_H\" /D \"_MSC_VER\"")
|
|
|
|
|
|
|
|
|
|
function(get_version_from_configure regex_arg ret)
|
|
|
|
|
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" VERSION_STR REGEX ${regex_arg})
|
|
|
|
|
string(REGEX MATCH ${regex_arg} VERSION_STR "${VERSION_STR}")
|
|
|
|
|
set("${ret}" ${CMAKE_MATCH_1} PARENT_SCOPE)
|
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|
get_version_from_configure("_GUI_VERSION_MAJOR\\], \\[([0-9]+)\\]" GUI_VERSION_MAJOR)
|
|
|
|
|
get_version_from_configure("_GUI_VERSION_MINOR\\], \\[([0-9]+)\\]" GUI_VERSION_MINOR)
|
|
|
|
|
|
|
|
|
|
configure_file(config-msvc.h.in config.h)
|
|
|
|
|
|
|
|
|
|
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
|
|
|
|
_UNICODE
|
|
|
|
|
UNICODE
|
|
|
|
|