2017-12-09 16:00:06 +08:00
|
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ARMmbed/mbedtls
|
2023-10-28 07:54:05 +08:00
|
|
|
REF "v${VERSION}"
|
2024-01-30 03:44:37 +08:00
|
|
|
SHA512 b61dd319606c88c834b3a8e8f9f85e68a22b6b21ca177b340a972dfabe9efee984b8a9f6ed5d3b1829f229c689394e9f393b94efb38d82bda3a1e53d1e7a2861
|
2022-03-29 04:36:33 +08:00
|
|
|
HEAD_REF mbedtls-2.28
|
2020-03-12 00:15:12 +08:00
|
|
|
PATCHES
|
|
|
|
enable-pthread.patch
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2022-03-29 04:36:33 +08:00
|
|
|
pthreads ENABLE_PTHREAD
|
2017-12-09 16:00:06 +08:00
|
|
|
)
|
|
|
|
|
2022-03-29 04:36:33 +08:00
|
|
|
vcpkg_cmake_configure(
|
2017-12-09 16:00:06 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2020-03-12 00:15:12 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2017-12-09 16:00:06 +08:00
|
|
|
-DENABLE_TESTING=OFF
|
|
|
|
-DENABLE_PROGRAMS=OFF
|
2021-01-25 15:37:22 +08:00
|
|
|
-DMBEDTLS_FATAL_WARNINGS=FALSE
|
2017-12-09 16:00:06 +08:00
|
|
|
)
|
|
|
|
|
2022-03-29 04:36:33 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-12-09 16:00:06 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2020-09-28 08:41:42 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
2017-12-09 16:00:06 +08:00
|
|
|
|
2021-01-25 15:37:22 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS AND pthreads IN_LIST FEATURES)
|
2020-09-28 08:41:42 +08:00
|
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
2021-01-25 15:37:22 +08:00
|
|
|
endif ()
|
2020-03-12 00:15:12 +08:00
|
|
|
|
2022-01-26 02:31:15 +08:00
|
|
|
vcpkg_copy_pdbs()
|