mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-14 05:29:15 +08:00
61 lines
2.0 KiB
CMake
61 lines
2.0 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO ngtcp2/nghttp3
|
|
REF v${VERSION}
|
|
SHA512 c5f8188b7c74a8162b4526d0d317f94db934eb75335c6ccc4f289d3e3592edb099b7cdc72d966db68140be99c3b6ebf34f5814d62a52b0dc4040d79fab2351cf
|
|
HEAD_REF main
|
|
PATCHES
|
|
)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SFPARSE_SOURCE_PATH
|
|
REPO ngtcp2/sfparse
|
|
REF c2e010d064d58f7775aca1aa29df20dd2f534a9a
|
|
SHA512 5556878d9bfd190e537064e069ca71e76aa0e3bc9fc1d5eef24f1b413a6d3abc584024fb81e188d8ae148673db279e665064cb9971cf04568148782152bd9702
|
|
HEAD_REF main
|
|
)
|
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/lib/sfparse")
|
|
file(MAKE_DIRECTORY "${SOURCE_PATH}/lib")
|
|
file(RENAME "${SFPARSE_SOURCE_PATH}" "${SOURCE_PATH}/lib/sfparse")
|
|
|
|
|
|
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
|
|
-DBUILD_TESTING=OFF
|
|
"-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}"
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
|
MAYBE_UNUSED_VARIABLES
|
|
BUILD_TESTING
|
|
)
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_fixup_pkgconfig()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/nghttp3")
|
|
|
|
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)
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|