2017-12-09 16:00:06 +08:00
|
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ARMmbed/mbedtls
|
2019-09-24 01:38:50 +08:00
|
|
|
REF mbedtls-2.16.3
|
|
|
|
SHA512 3d798f7de9c33325585d5d7c8608cc16acdcf42c246d283b2fb8a29f5e419f2899342965ff297432ef2ab20c91eaee28d6ca53349f5a68b0a4fd29d6905fc64c
|
2017-12-09 16:00:06 +08:00
|
|
|
HEAD_REF master
|
2020-03-12 00:15:12 +08:00
|
|
|
PATCHES
|
|
|
|
enable-pthread.patch
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
pthreads ENABLE_PTHREAD
|
2017-12-09 16:00:06 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mbedtls RENAME copyright)
|
|
|
|
|
2020-03-12 00:15:12 +08:00
|
|
|
if(WIN32 AND pthreads IN_LIST FEATURES)
|
|
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/mbedtls)
|
|
|
|
endif()
|
|
|
|
|
2017-12-09 16:00:06 +08:00
|
|
|
vcpkg_copy_pdbs()
|