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
|
2019-03-14 01:06:49 +08:00
|
|
|
REF rel-1-5-2
|
|
|
|
SHA512 5ba765c5d4ab47dff24bfa5e73b798046126fcc88b29d5d9ce9d77d035499ae91d90cc526f1f73bbefa07b7b68ff6cf77e912e5793859f801caaf2061cb20aee
|
2018-08-08 19:15:13 +08:00
|
|
|
HEAD_REF master
|
2019-03-14 01:06:49 +08:00
|
|
|
PATCHES avoid_computation_on_void_pointer.patch
|
2017-06-19 00:52:32 +08:00
|
|
|
)
|
|
|
|
|
2019-02-05 03:05:42 +08:00
|
|
|
# AES encryption
|
|
|
|
set(USE_OPENSSL OFF)
|
|
|
|
if("openssl" IN_LIST FEATURES)
|
|
|
|
set(USE_OPENSSL ON)
|
|
|
|
endif()
|
|
|
|
|
2019-03-14 01:06:49 +08:00
|
|
|
set(USE_BZIP2 OFF)
|
|
|
|
if("bzip2" IN_LIST FEATURES)
|
|
|
|
set(USE_BZIP2 ON)
|
|
|
|
endif()
|
|
|
|
|
2018-01-24 00:23:45 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2019-03-14 01:06:49 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_DOC=OFF
|
|
|
|
-DBUILD_EXAMPLES=OFF
|
|
|
|
-DBUILD_REGRESS=OFF
|
|
|
|
-DBUILD_TOOLS=OFF
|
|
|
|
# see https://github.com/nih-at/libzip/blob/rel-1-5-2/INSTALL.md
|
|
|
|
-DENABLE_OPENSSL=${USE_OPENSSL}
|
|
|
|
-DENABLE_BZIP2=${USE_BZIP2}
|
2018-01-24 00:23:45 +08:00
|
|
|
)
|
2017-06-19 00:52:32 +08:00
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2018-08-08 19:15:13 +08:00
|
|
|
# Remove include directories from lib
|
2017-06-19 00:52:32 +08:00
|
|
|
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
|
2018-08-08 19:15:13 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzip RENAME copyright)
|
2017-06-19 00:52:32 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|