mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 05:41:37 +08:00
47 lines
1.2 KiB
CMake
47 lines
1.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO aws/s2n-tls
|
|
REF "v${VERSION}"
|
|
SHA512 41abcde197e30845e64b3b63e2edf32b66611723505d176cbe439d5cc91dccf1c6dff0c53d896e5cfa5bbb65362a36dbe200883f658f47635b526c2fdf67210e
|
|
PATCHES
|
|
fix-cmake-target-path.patch
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
tests BUILD_TESTING
|
|
)
|
|
|
|
set(EXTRA_ARGS)
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
|
|
set(EXTRA_ARGS "-DS2N_NO_PQ=TRUE")
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
${EXTRA_ARGS}
|
|
${FEATURE_OPTIONS}
|
|
-DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/s2n/cmake)
|
|
|
|
if(BUILD_TESTING)
|
|
message(STATUS "Testing")
|
|
vcpkg_cmake_build(TARGET test LOGFILE_BASE test)
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/s2n"
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
"${CURRENT_PACKAGES_DIR}/lib/s2n"
|
|
"${CURRENT_PACKAGES_DIR}/share/s2n/modules"
|
|
)
|
|
|
|
# Handle copyright
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|