1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-07 00:04:57 +03:00

Cedar: Add "BLAKE2" submodule

OpenSSL provides BLAKE2s, but it only supports an output of 32 bytes. For WireGuard we need a 16 bytes output as well.

The minimum CMake version is bumped to 3.10 because it adds HAS_SSE2 to cmake_host_system_information(): https://cmake.org/cmake/help/v3.10/command/cmake_host_system_information.html
This commit is contained in:
Davide Beatrici
2021-03-01 02:37:00 +01:00
parent a39905c288
commit b339104f4f
4 changed files with 12 additions and 1 deletions

View File

@ -19,6 +19,13 @@ set_target_properties(cedar
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
)
cmake_host_system_information(RESULT HAS_SSE2 QUERY HAS_SSE2)
set(BLAKE2_SRC_PATH $<IF:$<BOOL:HAS_SSE2>,${TOP_DIRECTORY}/3rdparty/BLAKE2/sse,${TOP_DIRECTORY}/3rdparty/BLAKE2/ref>)
target_include_directories(cedar PUBLIC ${BLAKE2_SRC_PATH})
target_sources(cedar PRIVATE "${BLAKE2_SRC_PATH}/blake2s.c")
if(WIN32)
set_target_properties(cedar
PROPERTIES