[libgeotiff] build and install utility commands (#2784)

* [libgeotiff] install utility commands

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* [libgeotiff] install utility only when release build and unconditionaly copy tool dependencies

* [libgeotiff] fix tool instalation when static and bump version

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura 2018-02-17 20:14:58 +09:00 committed by Robert Schumacher
parent 621bde044b
commit 6142925568
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
Source: libgeotiff
Version: 1.4.2
Version: 1.4.2-1
Description: Libgeotiff is an open source library normally hosted on top of libtiff for reading, and writing GeoTIFF information tags.
Build-Depends: tiff, proj4, zlib, libjpeg-turbo

View File

@ -26,11 +26,12 @@ vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DWITH_UTILITIES=OFF
-DWITH_TIFF=ON
-DWITH_PROJ4=ON
-DWITH_ZLIB=ON
-DWITH_JPEG=ON
OPTIONS_RELEASE -DWITH_UTILITIES=ON
OPTIONS_DEBUG -DWITH_UTILITIES=OFF
)
vcpkg_build_cmake()
@ -40,6 +41,11 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright)
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(INSTALL ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff/)
file(REMOVE ${GEOTIFF_UTILS})
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
endif()
endif()