2018-02-08 22:13:38 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
set(LIBGEOTIFF_VERSION 1.4.2)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
|
|
URLS "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz"
|
|
|
|
FILENAME "libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz"
|
2019-05-29 07:58:00 +08:00
|
|
|
SHA512 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb
|
2018-10-22 19:16:02 +08:00
|
|
|
)
|
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
|
2019-05-29 07:58:00 +08:00
|
|
|
cmakelists.patch
|
2019-05-25 06:11:42 +08:00
|
|
|
geotiff-config.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
|
2019-05-29 07:58:00 +08:00
|
|
|
-DWITH_UTILITIES=ON
|
2018-02-08 22:13:38 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2019-05-29 07:58:00 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
|
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/*)
|
2019-05-29 07:58:00 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
2018-08-03 15:14:51 +08:00
|
|
|
else()
|
|
|
|
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
2019-05-29 07:58:00 +08:00
|
|
|
file(GLOB GEOTIFF_UTILS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
|
|
file(REMOVE ${GEOTIFF_UTILS_DEBUG})
|
2018-08-03 15:14:51 +08:00
|
|
|
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)
|
2019-05-29 07:58:00 +08:00
|
|
|
file(REMOVE ${GEOTIFF_UTILS})
|
2018-02-17 19:14:58 +08:00
|
|
|
|
2019-05-29 07:58:00 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
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
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2019-05-29 07:58:00 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF)
|
|
|
|
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
|
|
|
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
|
|
|
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
|
|
|
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
|
|
|
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright)
|
|
|
|
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc)
|