mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 08:10:51 +08:00
47 lines
1.5 KiB
CMake
47 lines
1.5 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO OSGeo/libgeotiff
|
|
REF 8b1a8f52bc909f86e04ceadd699db102208074a2 #v1.6.0
|
|
SHA512 41715d6a416307a93b2f95874c00ed27c3a0450d70311e77ed45f7ff477bd85f4a69b549bde01dfb9412a62a482467222fc8ed398478e2829e4d112012aab852
|
|
HEAD_REF master
|
|
PATCHES
|
|
cmakelists.patch
|
|
geotiff-config.patch
|
|
fix-proj4.patch
|
|
fix-staticbuild.patch
|
|
)
|
|
|
|
set(SOURCE_PATH ${SOURCE_PATH}/libgeotiff)
|
|
|
|
# Delete FindPROJ4.cmake
|
|
file(REMOVE ${SOURCE_PATH}/cmake/FindPROJ4.cmake)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DWITH_TIFF=1
|
|
-DWITH_PROJ4=1
|
|
-DWITH_ZLIB=1
|
|
-DWITH_JPEG=1
|
|
-DWITH_UTILITIES=1
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES applygeo geotifcp listgeo makegeo AUTO_CLEAN)
|
|
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF TARGET_PATH share/GeoTIFF)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/GeoTIFF/geotiff-config.cmake "if (GeoTIFF_USE_STATIC_LIBS)" "if (1)")
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/doc ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/${PORT}/doc)
|