mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-06 01:51:36 +08:00
c96b24ce57
* [vcpkg baseline][nghttp3] Fix configure when cunit was installed * version
46 lines
1.5 KiB
CMake
46 lines
1.5 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO ngtcp2/nghttp3
|
|
REF 635a532c8ff98cdbd6c141f85583632919102912 #v0.7.0 + GH-84 for fix UWP ARM 32 bits build
|
|
SHA512 d81a6b5c89a0c7065b76342f9ccfac6c39700ab2ff9822361b341235b96363b0582440282bdb19f8abd9231890baddf076ff955a3f535d564b87d13f319d4318
|
|
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
|
|
-DBUILD_TESTING=OFF
|
|
"-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}"
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CUnit=ON
|
|
MAYBE_UNUSED_VARIABLES
|
|
BUILD_TESTING
|
|
)
|
|
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)
|