2018-02-08 22:13:38 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
set(LIBGEOTIFF_VERSION 1.4.2)
|
|
|
|
set(LIBGEOTIFF_HASH 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
|
|
URLS "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz"
|
|
|
|
FILENAME "libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz"
|
2018-10-22 19:16:02 +08:00
|
|
|
SHA512 ${LIBGEOTIFF_HASH}
|
|
|
|
)
|
2018-02-08 22:13:38 +08:00
|
|
|
|
2018-10-22 19:16:02 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
REF ${LIBGEOTIFF_VERSION}
|
|
|
|
PATCHES
|
|
|
|
0001-Updates-to-CMake-configuration-to-align-with-other-C.patch
|
|
|
|
0002-Fix-directory-output.patch
|
|
|
|
0004-Fix-libxtiff-installation.patch
|
|
|
|
0005-Control-shared-library-build-with-option.patch
|
|
|
|
0006-Fix-utility-link-error.patch
|
2018-02-16 12:29:27 +08:00
|
|
|
)
|
2018-02-09 06:15:21 +08:00
|
|
|
|
2019-01-23 17:35:53 +08:00
|
|
|
# Delete FindPROJ4.cmake
|
|
|
|
file(REMOVE ${SOURCE_PATH}/cmake/FindPROJ4.cmake)
|
|
|
|
|
2018-02-08 22:13:38 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2018-08-03 15:14:51 +08:00
|
|
|
OPTIONS
|
|
|
|
-DWITH_TIFF=ON
|
|
|
|
-DWITH_PROJ4=ON
|
|
|
|
-DWITH_ZLIB=ON
|
|
|
|
-DWITH_JPEG=ON
|
2018-02-17 19:14:58 +08:00
|
|
|
OPTIONS_RELEASE -DWITH_UTILITIES=ON
|
|
|
|
OPTIONS_DEBUG -DWITH_UTILITIES=OFF
|
2018-02-08 22:13:38 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
2018-10-29 05:51:30 +08:00
|
|
|
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libgeotiff/copyright COPYONLY)
|
2018-02-09 12:39:22 +08:00
|
|
|
|
2018-08-03 15:14:51 +08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*)
|
|
|
|
else()
|
|
|
|
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
|
|
|
endif()
|
|
|
|
|
2018-10-29 05:51:30 +08:00
|
|
|
file(COPY ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
|
2018-02-17 19:14:58 +08:00
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
|
|
|
|
|
2018-08-03 15:14:51 +08:00
|
|
|
file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
|
|
if(EXES)
|
|
|
|
file(REMOVE ${EXES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
|
2018-02-09 12:39:22 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
|
2018-02-17 19:14:58 +08:00
|
|
|
endif()
|
2018-08-03 15:14:51 +08:00
|
|
|
|
2018-10-29 05:51:30 +08:00
|
|
|
# Move and cleanup doc files
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
|
|
|
|
|
2018-08-03 15:14:51 +08:00
|
|
|
vcpkg_copy_pdbs()
|