mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 18:19:07 +08:00
4920c80ea9
Fix CVE-2024-28182 https://github.com/nghttp2/nghttp2/security/advisories/GHSA-x6x3-gv8h-m57q Remove no longer needed no-tests.path, there is now an build option for disable TESTING
54 lines
1.7 KiB
CMake
54 lines
1.7 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO nghttp2/nghttp2
|
|
REF "v${VERSION}"
|
|
SHA512 20578805dd981ee488706680afbc81f374beece76a21e859a5550ae2a2ffe6bfd55e24161a8f28eeb5b5132cb5eddaa1b2f12f5aecf71d11b9d506cc451ed2bf
|
|
HEAD_REF master
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" ENABLE_STATIC_CRT)
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIB)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DENABLE_LIB_ONLY=ON
|
|
-DENABLE_DOC=OFF
|
|
-DBUILD_TESTING=OFF
|
|
"-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}"
|
|
"-DBUILD_STATIC_LIBS=${ENABLE_STATIC_LIB}"
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=ON
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libngtcp2=ON
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libngtcp2_crypto_quictls=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
|
|
MAYBE_UNUSED_VARIABLES
|
|
ENABLE_STATIC_CRT
|
|
)
|
|
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/doc"
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake"
|
|
"${CURRENT_PACKAGES_DIR}/lib/cmake"
|
|
)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/include/nghttp2/nghttp2ver.h" [[
|
|
#ifndef NGHTTP2_STATICLIB
|
|
# define NGHTTP2_STATICLIB
|
|
#endif
|
|
]])
|
|
endif()
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|