diff options
| author | Raynor Vliegendhart <shinnonoir+git@gmail.com> | 2019-11-22 02:00:19 +0100 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2019-11-21 17:00:19 -0800 |
| commit | 90a40c6658396d0dd8ad980239d722f337543eac (patch) | |
| tree | bf48d883d508b09529d47987a49ecbe2f291873d | |
| parent | b12c4501d8038f047be6e171a391e5391bb0ba41 (diff) | |
| download | vcpkg-90a40c6658396d0dd8ad980239d722f337543eac.tar.gz vcpkg-90a40c6658396d0dd8ad980239d722f337543eac.zip | |
[tiff] Make BUILD_TOOLS option a feature (#9010)
* [tiff] Make BUILD_TOOLS option a feature
* [tiff] Fix tool-feature for static linkage
| -rw-r--r-- | ports/tiff/CONTROL | 5 | ||||
| -rw-r--r-- | ports/tiff/portfile.cmake | 18 |
2 files changed, 21 insertions, 2 deletions
diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index 7cf6005dc..270455ca2 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,5 +1,8 @@ Source: tiff -Version: 4.0.10-7 +Version: 4.0.10-8 Build-Depends: zlib, libjpeg-turbo, liblzma Homepage: https://download.osgeo.org/libtiff Description: A library that supports the manipulation of TIFF image files + +Feature: tool +Description: Build tools diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index 373ceac7c..d09aa10ef 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -21,11 +21,15 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQ set (TIFF_CXX_TARGET -Dcxx=OFF) endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tool BUILD_TOOLS +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_TOOLS=OFF + ${FEATURE_OPTIONS} -DBUILD_DOCS=OFF -DBUILD_CONTRIB=OFF -DBUILD_TESTS=OFF @@ -50,4 +54,16 @@ file(REMOVE_RECURSE file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff) file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff RENAME copyright) +if ("tool" IN_LIST FEATURES) + file(GLOB TIFF_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(INSTALL ${TIFF_TOOLS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(REMOVE ${TIFF_TOOLS}) + file(GLOB TIFF_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${TIFF_TOOLS}) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +endif() + vcpkg_copy_pdbs() |
