mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Compare commits
1 Commits
73c6bc2fa8
...
4889dfe150
Author | SHA1 | Date | |
---|---|---|---|
|
4889dfe150 |
@ -19,19 +19,7 @@ set_target_properties(mayaqua
|
|||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
|
||||||
if(OPENSSL_VERSION VERSION_LESS "3") # Disable oqsprovider when OpenSSL version < 3
|
if(OPENSSL_VERSION VERSION_LESS "3") # Disable oqsprovider when OpenSSL version < 3
|
||||||
add_definitions(-DSKIP_OQS_PROVIDER)
|
set(SKIP_OQS_PROVIDER ON)
|
||||||
else()
|
|
||||||
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "Set liboqs to build only the library (no tests)")
|
|
||||||
set(BUILD_TESTING OFF CACHE BOOL "By setting this to OFF, no tests or examples will be compiled.")
|
|
||||||
set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared)
|
|
||||||
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/Mayaqua/3rdparty/")
|
|
||||||
|
|
||||||
add_subdirectory(3rdparty/liboqs)
|
|
||||||
add_subdirectory(3rdparty/oqs-provider)
|
|
||||||
|
|
||||||
target_include_directories(oqsprovider PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/3rdparty/liboqs/include)
|
|
||||||
set_property(TARGET oqsprovider PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
||||||
target_link_libraries(mayaqua PRIVATE oqsprovider)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
@ -90,6 +78,22 @@ if(WIN32)
|
|||||||
"ws2_32.lib"
|
"ws2_32.lib"
|
||||||
"WtsApi32.Lib"
|
"WtsApi32.Lib"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (SKIP_OQS_PROVIDER)
|
||||||
|
add_definitions(-DSKIP_OQS_PROVIDER)
|
||||||
|
else()
|
||||||
|
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "Set liboqs to build only the library (no tests)")
|
||||||
|
set(BUILD_TESTING OFF CACHE BOOL "By setting this to OFF, no tests or examples will be compiled.")
|
||||||
|
set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared)
|
||||||
|
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/Mayaqua/3rdparty/")
|
||||||
|
|
||||||
|
add_subdirectory(3rdparty/liboqs)
|
||||||
|
add_subdirectory(3rdparty/oqs-provider)
|
||||||
|
|
||||||
|
target_include_directories(oqsprovider PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/3rdparty/liboqs/include)
|
||||||
|
set_property(TARGET oqsprovider PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
|
target_link_libraries(mayaqua PRIVATE oqsprovider)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
@ -108,6 +112,22 @@ if(UNIX)
|
|||||||
$<$<BOOL:${LIB_M}>:${LIB_M}>
|
$<$<BOOL:${LIB_M}>:${LIB_M}>
|
||||||
$<$<BOOL:${LIB_RT}>:${LIB_RT}>
|
$<$<BOOL:${LIB_RT}>:${LIB_RT}>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (SKIP_OQS_PROVIDER)
|
||||||
|
add_definitions(-DSKIP_OQS_PROVIDER)
|
||||||
|
else()
|
||||||
|
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "Set liboqs to build only the library (no tests)")
|
||||||
|
set(BUILD_TESTING OFF CACHE BOOL "By setting this to OFF, no tests or examples will be compiled.")
|
||||||
|
set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared)
|
||||||
|
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/Mayaqua/3rdparty/")
|
||||||
|
|
||||||
|
add_subdirectory(3rdparty/liboqs)
|
||||||
|
add_subdirectory(3rdparty/oqs-provider)
|
||||||
|
|
||||||
|
target_include_directories(oqsprovider PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/3rdparty/liboqs/include)
|
||||||
|
set_property(TARGET oqsprovider PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
|
target_link_libraries(mayaqua PRIVATE oqsprovider)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7l|aarch64|s390x)$" OR NOT HAVE_SYS_AUXV OR SKIP_CPU_FEATURES)
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7l|aarch64|s390x)$" OR NOT HAVE_SYS_AUXV OR SKIP_CPU_FEATURES)
|
||||||
add_definitions(-DSKIP_CPU_FEATURES)
|
add_definitions(-DSKIP_CPU_FEATURES)
|
||||||
|
Loading…
Reference in New Issue
Block a user