[mbedtls] Initial port. (#2286)

* mbedtls: init port

* add VCPKG_LIBRARY_LINKAGE for static libs only

* [mbedtls] Slight cleanup
This commit is contained in:
lcdtyph 2017-12-09 16:00:06 +08:00 committed by Robert Schumacher
parent 2bcb3c98f5
commit 940b33e52d
2 changed files with 30 additions and 0 deletions

3
ports/mbedtls/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: mbedtls
Version: 2.6.1
Description: An open source, portable, easy to use, readable and flexible SSL library

View File

@ -0,0 +1,27 @@
include(vcpkg_common_functions)
set(VCPKG_LIBRARY_LINKAGE static)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ARMmbed/mbedtls
REF mbedtls-2.6.1
SHA512 06f8ba2a453164bac01d20ca6f5c80e691857977ef501d56685e81a0e90dddae1bedeab46c18c22f9a3b72894d45d7466f76a5c404417b6613ddae0ee4a881c8
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-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)
vcpkg_copy_pdbs()