2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO nghttp2/nghttp2
|
2023-05-17 23:38:57 +08:00
|
|
|
REF v${VERSION}
|
2023-11-01 02:56:04 +08:00
|
|
|
SHA512 70d7b37b57494847dd6ce940361a4add2dbbd0f533253cafb926089bbf9ad2376d52bf6334427521a133517fae14b7f96ca4c052c434c28ebcfb1a66db884d1d
|
2019-10-08 01:35:13 +08:00
|
|
|
HEAD_REF master
|
2017-12-21 16:13:50 +08:00
|
|
|
)
|
|
|
|
|
2021-07-29 03:25:26 +08:00
|
|
|
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)
|
2020-06-02 06:59:58 +08:00
|
|
|
|
2021-07-29 03:25:26 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-12-21 16:13:50 +08:00
|
|
|
OPTIONS
|
|
|
|
-DENABLE_LIB_ONLY=ON
|
2021-07-29 03:25:26 +08:00
|
|
|
"-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}"
|
|
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
2023-03-01 10:11:47 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libev=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libcares=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libngtcp2=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libngtcp2_crypto_openssl=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libnghttp3=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Systemd=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Jansson=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libevent=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Jemalloc=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Threads=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CUnit=ON
|
2017-12-21 16:13:50 +08:00
|
|
|
)
|
2021-07-29 03:25:26 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
2020-12-05 07:59:14 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-12-21 16:13:50 +08:00
|
|
|
|
2021-07-29 03:25:26 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/man"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/doc"
|
|
|
|
)
|
2017-12-21 16:13:50 +08:00
|
|
|
|
2019-08-15 15:40:16 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2021-07-29 03:25:26 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/bin"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/bin"
|
|
|
|
)
|
|
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/include/nghttp2/nghttp2ver.h" [[
|
|
|
|
#ifndef NGHTTP2_STATICLIB
|
|
|
|
# define NGHTTP2_STATICLIB
|
|
|
|
#endif
|
|
|
|
]])
|
2017-12-21 16:13:50 +08:00
|
|
|
endif()
|
|
|
|
|
2021-07-29 03:25:26 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|