2017-12-21 16:13:50 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
set(LIB_NAME nghttp2)
|
2019-08-15 15:40:16 +08:00
|
|
|
set(LIB_VERSION 1.39.2)
|
2017-12-21 16:13:50 +08:00
|
|
|
|
|
|
|
set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz)
|
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO nghttp2/nghttp2
|
|
|
|
REF v${LIB_VERSION}
|
|
|
|
SHA512 1ddfb8c6538e209e39199fb5e2f9c262d58d188f25c98cd03f9f733bb261055b7625f0f79863731b112e69bc40c9d6a7d10d4fe69f56c615127e03277ee3af1d
|
|
|
|
HEAD_REF master
|
2017-12-21 16:13:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-02-08 04:12:14 +08:00
|
|
|
PREFER_NINJA
|
2017-12-21 16:13:50 +08:00
|
|
|
OPTIONS
|
|
|
|
-DENABLE_LIB_ONLY=ON
|
|
|
|
-DENABLE_ASIO_LIB=OFF
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
|
|
|
|
|
2019-08-15 15:40:16 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
2017-12-21 16:13:50 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright)
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|