vcpkg/ports/mbedtls/portfile.cmake
Jia Yue Hua b86f18b286
[mbedtls] update to 2.28.5 (#34744)
* [mbedtls] update to 2.28.5

* [mbedtls] update to 2.28.5
2023-10-27 16:54:05 -07:00

39 lines
1.0 KiB
CMake

set(VCPKG_LIBRARY_LINKAGE static)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ARMmbed/mbedtls
REF "v${VERSION}"
SHA512 7b19dff013910b5300662d48be5adb0e7c4d2c54b79116992642e5c9850cd62a14aea69b121458d3441154e3f2a13fd9a33ad86a26f17e4d94a872970ea841e0
HEAD_REF mbedtls-2.28
PATCHES
enable-pthread.patch
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
pthreads ENABLE_PTHREAD
)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
${FEATURE_OPTIONS}
-DENABLE_TESTING=OFF
-DENABLE_PROGRAMS=OFF
-DMBEDTLS_FATAL_WARNINGS=FALSE
)
vcpkg_cmake_install()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
if (VCPKG_TARGET_IS_WINDOWS AND pthreads IN_LIST FEATURES)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
endif ()
vcpkg_copy_pdbs()