2022-08-30 07:26:10 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ngtcp2/nghttp3
|
2023-03-03 04:03:57 +08:00
|
|
|
REF v${VERSION}
|
2023-06-07 03:27:45 +08:00
|
|
|
SHA512 a1ac58a8911a55140c5bff87c19cd152fdf3417d6ca26a26a230f914f5e7e1154304ecae8726d04832d2dbc37ce01666db2e32f31e5e73ab50ef0c2d300e5ff1
|
2022-08-30 07:26:10 +08:00
|
|
|
HEAD_REF main
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" ENABLE_STATIC_CRT)
|
|
|
|
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_LIB_ONLY=ON
|
2022-09-01 04:48:17 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2022-08-30 07:26:10 +08:00
|
|
|
"-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}"
|
|
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
2022-09-01 04:48:17 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CUnit=ON
|
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
BUILD_TESTING
|
2022-08-30 07:26:10 +08:00
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/man"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/doc"
|
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/bin"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/bin"
|
|
|
|
)
|
|
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/include/nghttp3/version.h" [[
|
|
|
|
]])
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|