2017-04-27 23:00:00 +08:00
|
|
|
include(vcpkg_common_functions)
|
2019-03-23 18:07:21 +08:00
|
|
|
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2019-03-27 08:31:19 +08:00
|
|
|
set(GIFLIB_VERSION 5.1.4)
|
2017-04-27 23:00:00 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2019-05-10 02:45:23 +08:00
|
|
|
URLS "https://nchc.dl.sourceforge.net/project/giflib/giflib-${GIFLIB_VERSION}.tar.bz2"
|
2019-03-27 08:31:19 +08:00
|
|
|
FILENAME "giflib-${GIFLIB_VERSION}.tar.bz2"
|
2017-04-27 23:00:00 +08:00
|
|
|
SHA512 32b5e342056c210e6478e9cb3b6ceec9594dcfaf34feea1eb4dad633a081ed4465bceee578c19165907cb47cb83912ac359ceea666a8e07dbbb5420f9928f96d
|
|
|
|
)
|
2019-03-23 18:07:21 +08:00
|
|
|
|
2019-05-10 02:45:23 +08:00
|
|
|
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
|
|
|
|
set(ADDITIONAL_PATCH "fix-compile-error.patch")
|
|
|
|
endif()
|
|
|
|
|
2019-03-27 08:31:19 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
REF ${GIFLIB_VERSION}
|
2019-03-29 05:46:21 +08:00
|
|
|
PATCHES
|
|
|
|
msvc-guard-unistd-h.patch
|
2019-05-10 02:45:23 +08:00
|
|
|
${ADDITIONAL_PATCH}
|
2019-03-27 08:31:19 +08:00
|
|
|
)
|
2019-03-23 18:07:21 +08:00
|
|
|
|
2017-04-27 23:00:00 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2019-04-06 00:39:50 +08:00
|
|
|
PREFER_NINJA
|
2017-04-27 23:00:00 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DGIFLIB_SKIP_HEADERS=ON
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/giflib RENAME copyright)
|