2017-01-06 04:22:32 +08:00
|
|
|
# libarchive uses winapi functions not available in WindowsStore
|
|
|
|
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
|
|
|
|
message(FATAL_ERROR "Error: UWP builds are not supported.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(vcpkg_common_functions)
|
2017-07-13 00:26:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libarchive/libarchive
|
|
|
|
REF v3.3.2
|
|
|
|
SHA512 7bc17d6f742080278e35f86b0233d70045df0ca1578cd427126e0acce183709bf33ecca689db65e2e67bdfaf687c04d36cae1202a926beeebc88076648aa40bc
|
|
|
|
HEAD_REF master)
|
2017-01-06 04:22:32 +08:00
|
|
|
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES
|
2017-05-11 00:20:37 +08:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch)
|
2017-01-06 04:22:32 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-04-05 22:06:42 +08:00
|
|
|
PREFER_NINJA
|
2017-01-06 04:22:32 +08:00
|
|
|
OPTIONS
|
2017-04-05 22:06:42 +08:00
|
|
|
-DENABLE_LZO=OFF
|
2017-01-06 04:22:32 +08:00
|
|
|
-DENABLE_NETTLE=OFF
|
|
|
|
-DENABLE_EXPAT=OFF
|
|
|
|
-DENABLE_LibGCC=OFF
|
|
|
|
-DENABLE_CNG=OFF
|
|
|
|
-DENABLE_TAR=OFF
|
|
|
|
-DENABLE_CPIO=OFF
|
|
|
|
-DENABLE_CAT=OFF
|
|
|
|
-DENABLE_XATTR=OFF
|
|
|
|
-DENABLE_ACL=OFF
|
|
|
|
-DENABLE_TEST=OFF
|
2017-01-26 13:14:57 +08:00
|
|
|
-DENABLE_ICONV=OFF
|
2017-04-05 22:06:42 +08:00
|
|
|
-DPOSIX_REGEX_LIB=NONE)
|
2017-01-06 04:22:32 +08:00
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2017-04-05 22:06:42 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
foreach(HEADER ${CURRENT_PACKAGES_DIR}/include/archive.h ${CURRENT_PACKAGES_DIR}/include/archive_entry.h)
|
|
|
|
file(READ ${HEADER} CONTENTS)
|
|
|
|
string(REPLACE "(!defined LIBARCHIVE_STATIC)" "0" CONTENTS "${CONTENTS}")
|
|
|
|
file(WRITE ${HEADER} "${CONTENTS}")
|
|
|
|
endforeach()
|
2017-01-06 04:22:32 +08:00
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libarchive)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libarchive/COPYING ${CURRENT_PACKAGES_DIR}/share/libarchive/copyright)
|