mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 13:47:51 +08:00
33 lines
972 B
CMake
33 lines
972 B
CMake
include(vcpkg_common_functions)
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO nih-at/libzip
|
|
REF rel-1-5-0
|
|
SHA512 d8267dd86231d82e0d14fc3e47c7deed3f54bccbc734dff12a7e2522422653f64ebdb76b35b9eb4326227ae89e06bd4cad263558c8312220ff5979b3b2299460
|
|
)
|
|
|
|
# Patch cmake and configuration to allow static builds
|
|
vcpkg_apply_patches(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PATCHES
|
|
"${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch"
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
# Move zipconf.h to include and remove include directories from lib
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip)
|
|
|
|
# Remove debug include
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
# Copy copright information
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzip RENAME copyright)
|
|
|
|
vcpkg_copy_pdbs()
|