2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2017-07-22 13:00:32 +08:00
|
|
|
vcpkg_from_github(
|
2019-11-26 07:54:49 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO madler/zlib
|
|
|
|
REF v1.2.11
|
|
|
|
SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf
|
|
|
|
HEAD_REF master
|
2020-09-25 06:15:06 +08:00
|
|
|
PATCHES
|
|
|
|
0001-remove-ifndef-NOUNCRYPT.patch
|
|
|
|
0002-add-declaration-for-mkdir.patch
|
2021-04-20 08:12:16 +08:00
|
|
|
0003-no-io64.patch
|
2022-07-26 05:39:36 +08:00
|
|
|
0004-define.patch
|
2017-07-22 13:00:32 +08:00
|
|
|
)
|
|
|
|
|
2019-11-26 07:54:49 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
bzip2 ENABLE_BZIP2
|
|
|
|
)
|
2019-07-19 01:26:48 +08:00
|
|
|
|
2022-07-26 05:39:36 +08:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/minizipConfig.cmake.in" "${SOURCE_PATH}/cmake/minizipConfig.cmake.in" COPYONLY)
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${SOURCE_PATH}/CMakeLists.txt" COPYONLY)
|
2017-07-22 13:00:32 +08:00
|
|
|
|
2022-07-26 05:39:36 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-09-25 06:15:06 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2021-04-20 08:12:16 +08:00
|
|
|
-DDISABLE_INSTALL_TOOLS=${VCPKG_TARGET_IS_IOS}
|
2020-09-25 06:15:06 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DDISABLE_INSTALL_HEADERS=ON
|
2017-07-22 13:00:32 +08:00
|
|
|
)
|
|
|
|
|
2022-07-26 05:39:36 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-07-22 13:00:32 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-07-26 05:39:36 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/minizip")
|
2019-07-19 01:26:48 +08:00
|
|
|
|
|
|
|
if ("bzip2" IN_LIST FEATURES)
|
2019-11-26 07:54:49 +08:00
|
|
|
file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h")
|
|
|
|
foreach(HEADER ${HEADERS})
|
|
|
|
file(READ "${HEADER}" _contents)
|
|
|
|
string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}")
|
|
|
|
file(WRITE "${HEADER}" "${_contents}")
|
|
|
|
endforeach()
|
2019-07-19 01:26:48 +08:00
|
|
|
endif()
|
2017-07-24 02:46:49 +08:00
|
|
|
|
2022-07-26 05:39:36 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|