2022-12-03 01:23:59 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ngtcp2/ngtcp2
|
2023-03-07 04:09:55 +08:00
|
|
|
REF "v${VERSION}"
|
2023-03-03 04:03:57 +08:00
|
|
|
SHA512 8456ca20c54da8627cd37c313605563bc7bc2f80409aae0049354877e4ccc351f8dd1129ae67bb9fd3b148a2ef69db3670d6c1d2b8df40da26fa8c1b56993e03
|
2022-12-03 01:23:59 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
export-unofficical-target.patch
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIB)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIB)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
2023-03-07 04:09:55 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_GnuTLS=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_wolfssl=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Jemalloc=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libev=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libnghttp3=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CUnit=ON
|
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_GnuTLS
|
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_Jemalloc
|
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_wolfssl
|
2022-12-03 01:23:59 +08:00
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "share/unofficial-ngtcp2")
|
|
|
|
|
|
|
|
# Clean
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/doc")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
|
|
|
#License
|
2023-03-07 04:09:55 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|