2017-06-19 00:52:32 +08:00
|
|
|
include(vcpkg_common_functions)
|
2018-01-24 00:23:45 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO nih-at/libzip
|
2018-03-09 17:41:40 +08:00
|
|
|
REF ad1f02d3b2aac532a89cbf8fd21f55677789b82d
|
|
|
|
SHA512 b1ed427916ec555ead454d39a244502f64bbc8799c20394944797b878196f1b9a9dda64be218fe89bb1747c841d7b36e8e7fb7b0be1fbdf777f049cd823635d6
|
2017-06-19 00:52:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# Patch cmake and configuration to allow static builds
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-01-24 00:23:45 +08:00
|
|
|
PATCHES
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch"
|
2017-06-19 00:52:32 +08:00
|
|
|
)
|
|
|
|
|
2018-01-24 00:23:45 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
)
|
2017-06-19 00:52:32 +08:00
|
|
|
|
|
|
|
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()
|