mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 17:51:47 +08:00
40 lines
1.2 KiB
CMake
40 lines
1.2 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
set(LIB_NAME nghttp2)
|
|
set(LIB_VERSION 1.39.2)
|
|
|
|
set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz)
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION})
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "https://github.com/nghttp2/nghttp2/releases/download/v${LIB_VERSION}/${LIB_FILENAME}"
|
|
FILENAME "${LIB_FILENAME}"
|
|
SHA512 1623a6bd9de1ca4d0742919b973eaefd570b250eb109697e5cf2240d2062789d1ca58632fdff32bb17f524b102fade0e30ab3f400dc2c128bfb91a75277f13e0
|
|
)
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DENABLE_LIB_ONLY=ON
|
|
-DENABLE_ASIO_LIB=OFF
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
# Remove unwanted files
|
|
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)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
endif()
|
|
|
|
# License and man
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright)
|
|
|
|
vcpkg_copy_pdbs()
|