mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 00:59:07 +08:00
43 lines
1.3 KiB
CMake
43 lines
1.3 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO ngtcp2/ngtcp2
|
|
REF "v${VERSION}"
|
|
SHA512 891a7339122f60b1796bb24d29ab75d0316717c2a64a45bade805242b70cb8713abc7642cdf0ec646ab9e80085d65117f0ea9b1e671d76bcd54038b0ea9bc868
|
|
HEAD_REF main
|
|
PATCHES
|
|
openssl_required.patch
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIB)
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIB)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
wolfssl ENABLE_WOLFSSL
|
|
gnutls ENABLE_GNUTLS
|
|
libressl ENABLE_OPENSSL
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
${FEATURE_OPTIONS}
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
|
-DBUILD_TESTING=OFF
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libev=ON
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libnghttp3=ON
|
|
-DCMAKE_INSTALL_DOCDIR=share/ngtcp2
|
|
)
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_fixup_pkgconfig()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/ngtcp2")
|
|
|
|
file(REMOVE_RECURSE
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
)
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|