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()