mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-30 20:59:12 +08:00
a003690587
Fix CVE-2023-35945 and GHSA-jfxv-29pc-x22r (https://github.com/envoyproxy/envoy/security/advisories/GHSA-jfxv-29pc-x22r)
59 lines
2.0 KiB
CMake
59 lines
2.0 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO nghttp2/nghttp2
|
|
REF v${VERSION}
|
|
SHA512 0ab1a987ec99f7b0652e75a93bebff9a5363f52758be1f6ae8626dcf9f4b2f931dec0a276cdd7b81522c61040e008345ecc5011c17a763b97a48b0f7e2615451
|
|
HEAD_REF master
|
|
)
|
|
|
|
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
|
|
"-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}"
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
|
-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
|
|
)
|
|
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/nghttp2/nghttp2ver.h" [[
|
|
#ifndef NGHTTP2_STATICLIB
|
|
# define NGHTTP2_STATICLIB
|
|
#endif
|
|
]])
|
|
endif()
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|