2021-09-15 10:06:34 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO aws/s2n-tls
|
2021-12-15 02:49:00 +08:00
|
|
|
REF ab9a3be5a8abcbc5bd7bdba662497a717737c838 # v1.3.0
|
|
|
|
SHA512 0150cba56f7940253ffa5af0c27fdc8db08961d4c8a80377d25f588fa8a56249eb02723304969d0fdebe570388545527ee826a3070c21e50e63c4f021d425728
|
|
|
|
PATCHES
|
|
|
|
fix-cmake-target-path.patch
|
|
|
|
use-openssl-crypto.patch
|
2021-09-15 10:06:34 +08:00
|
|
|
)
|
|
|
|
|
2021-12-15 02:49:00 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
tests BUILD_TESTING
|
|
|
|
)
|
2021-09-15 10:06:34 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-12-15 02:49:00 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2022-01-11 05:12:17 +08:00
|
|
|
-DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF
|
2021-09-15 10:06:34 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
2021-12-15 02:49:00 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-09-23 04:28:14 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/s2n/cmake)
|
2021-09-15 10:06:34 +08:00
|
|
|
|
2021-12-15 02:49:00 +08:00
|
|
|
if(BUILD_TESTING)
|
|
|
|
message(STATUS Testing)
|
|
|
|
vcpkg_cmake_build(TARGET test LOGFILE_BASE test)
|
|
|
|
endif()
|
|
|
|
|
2021-09-15 10:06:34 +08:00
|
|
|
file(REMOVE_RECURSE
|
2021-09-23 04:28:14 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/s2n"
|
2021-12-15 02:49:00 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/s2n"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/s2n/modules"
|
|
|
|
)
|
2021-09-15 10:06:34 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|