mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-02 22:35:31 +08:00
ad34a65684
This bumps openvpn3 version to latest stable release and adds missing libraries. Signed-off-by: Lev Stipakov <lev@openvpn.net>
32 lines
943 B
CMake
32 lines
943 B
CMake
cmake_minimum_required(VERSION 3.0)
|
|
project(openvpncli CXX)
|
|
|
|
find_path(ASIO_HPP asio.hpp)
|
|
find_library(MBEDTLS_LIB mbedtls)
|
|
find_library(MBEDCRYPTO_LIB mbedcrypto)
|
|
find_library(MBEDX509_LIB mbedx509)
|
|
|
|
include_directories(. ${ASIO_HPP})
|
|
|
|
if(WIN32)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
|
|
endif()
|
|
|
|
add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS -D_WIN32_WINNT=0x0600)
|
|
|
|
add_library(ovpncli client/ovpncli.cpp)
|
|
target_link_libraries(ovpncli PRIVATE Iphlpapi.lib Wininet.lib Setupapi.lib Cfgmgr32.lib Rpcrt4.lib Fwpuclnt.lib Wtsapi32.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB})
|
|
|
|
install(
|
|
TARGETS ovpncli
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib
|
|
ARCHIVE DESTINATION lib
|
|
)
|
|
|
|
if(BUILD_TOOL)
|
|
add_executable(cli test/ovpncli/cli.cpp)
|
|
target_compile_definitions(cli PRIVATE -DTAP_WIN_COMPONENT_ID=tap0901)
|
|
target_link_libraries(cli PRIVATE ovpncli)
|
|
endif()
|