2018-02-25 22:37:39 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO gdraheim/zziplib
|
2020-10-14 04:17:32 +08:00
|
|
|
REF 24a6c6de1956189bffcd8dffd2ef3197c6f3df29 # v0.13.71
|
|
|
|
SHA512 246ee1d93f3f8a6889e9ab362e04e6814813844f2cdea0a782910bf07ca55ecd6d8b1c456b4180935464cebf291e7849af27ac0ed5cc080de5fb158f9f3aeffb
|
2020-12-24 09:12:03 +08:00
|
|
|
PATCHES
|
|
|
|
install-dll-to-proper-folder.patch
|
|
|
|
no-release-postfix.patch
|
|
|
|
fix-export-define.patch
|
|
|
|
always-find-unixcommands-on-unix.patch
|
2016-10-22 04:45:44 +08:00
|
|
|
)
|
|
|
|
|
2020-12-24 09:12:03 +08:00
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
|
|
|
set(MSVC_STATIC_RUNTIME ON)
|
|
|
|
else()
|
|
|
|
set(MSVC_STATIC_RUNTIME OFF)
|
2019-05-03 07:06:44 +08:00
|
|
|
endif()
|
|
|
|
|
2020-12-24 09:12:03 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
set(BUILD_STATIC_LIBS ON)
|
|
|
|
else()
|
|
|
|
set(BUILD_STATIC_LIBS OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
set(ZZIPLIBTOOL OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS")
|
|
|
|
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS")
|
2016-10-22 04:45:44 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2019-05-01 07:54:33 +08:00
|
|
|
PREFER_NINJA
|
2020-12-24 09:12:03 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
|
|
|
-DMSVC_STATIC_RUNTIME=${MSVC_STATIC_RUNTIME}
|
|
|
|
-DZZIPMMAPPED=OFF
|
|
|
|
-DZZIPFSEEKO=OFF
|
|
|
|
-DZZIPWRAP=OFF
|
|
|
|
-DZZIPSDL=OFF
|
|
|
|
-DZZIPBINS=OFF
|
|
|
|
-DZZIPTEST=OFF
|
|
|
|
-DZZIPDOCS=OFF
|
|
|
|
-DZZIPCOMPAT=OFF
|
|
|
|
-DZZIPLIBTOOL=${ZZIPLIBTOOL}
|
2016-10-22 04:45:44 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
# Handle copyright
|
2020-12-24 09:12:03 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
2021-10-28 06:19:28 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|