aboutsummaryrefslogtreecommitdiff
path: root/ports/tiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-09-11 13:11:51 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2018-09-24 18:08:52 -0700
commitb35f75d646e8e66ac515a0836e9a808bee54c7ba (patch)
treedbee7e5df3473f5aac764dc851318545ce8a82d8 /ports/tiff
parentfd5fe4132c1ea2e5b4277a7ebe2f34f0bfce19fd (diff)
downloadvcpkg-b35f75d646e8e66ac515a0836e9a808bee54c7ba.tar.gz
vcpkg-b35f75d646e8e66ac515a0836e9a808bee54c7ba.zip
[cairo][expat][fontconfig][graphicsmagick][libjpeg-turbo][pixman][tiff] Add unofficial targets and usage information
Diffstat (limited to 'ports/tiff')
-rw-r--r--ports/tiff/portfile.cmake22
-rw-r--r--ports/tiff/usage4
-rw-r--r--ports/tiff/vcpkg-cmake-wrapper.cmake9
3 files changed, 21 insertions, 14 deletions
diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake
index 5ff4baa92..7062c1ce1 100644
--- a/ports/tiff/portfile.cmake
+++ b/ports/tiff/portfile.cmake
@@ -1,21 +1,20 @@
include(vcpkg_common_functions)
set(LIBTIFF_VERSION 4.0.9)
-set(LIBTIFF_HASH 04f3d5eefccf9c1a0393659fe27f3dddd31108c401ba0dc587bca152a1c1f6bc844ba41622ff5572da8cc278593eff8c402b44e7af0a0090e91d326c2d79f6cd)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tiff-${LIBTIFF_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz"
FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz"
- SHA512 ${LIBTIFF_HASH}
+ SHA512 04f3d5eefccf9c1a0393659fe27f3dddd31108c401ba0dc587bca152a1c1f6bc844ba41622ff5572da8cc278593eff8c402b44e7af0a0090e91d326c2d79f6cd
)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-component-options.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix-cxx-shared-libs.patch
- ${CMAKE_CURRENT_LIST_DIR}/crt-secure-no-deprecate.patch
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ REF ${LIBTIFF_VERSION}
+ PATCHES
+ add-component-options.patch
+ fix-cxx-shared-libs.patch
+ crt-secure-no-deprecate.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
@@ -53,5 +52,8 @@ file(INSTALL
DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff
RENAME copyright
)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff)
vcpkg_copy_pdbs()
+
+vcpkg_test_cmake(PACKAGE_NAME TIFF MODULE)
diff --git a/ports/tiff/usage b/ports/tiff/usage
new file mode 100644
index 000000000..d5312603a
--- /dev/null
+++ b/ports/tiff/usage
@@ -0,0 +1,4 @@
+The package tiff is compatible with built-in CMake targets:
+
+ find_package(TIFF REQUIRED)
+ target_link_libraries(main PRIVATE TIFF::TIFF)
diff --git a/ports/tiff/vcpkg-cmake-wrapper.cmake b/ports/tiff/vcpkg-cmake-wrapper.cmake
index fed3875b8..8edcb5e43 100644
--- a/ports/tiff/vcpkg-cmake-wrapper.cmake
+++ b/ports/tiff/vcpkg-cmake-wrapper.cmake
@@ -8,15 +8,16 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
endif()
find_package(JPEG)
- list(APPEND TIFF_EXTRA_LIBRARIES ${JPEG_LIBRARIES})
-
find_package(ZLIB)
if(TARGET TIFF::TIFF)
- set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_EXTRA_LIBRARIES} ZLIB::ZLIB)
+ set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_EXTRA_LIBRARIES} JPEG::JPEG ZLIB::ZLIB)
+ if(UNIX)
+ set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m)
+ endif()
endif()
if(TIFF_LIBRARIES)
- list(APPEND TIFF_LIBRARIES ${TIFF_EXTRA_LIBRARIES} ${ZLIB_LIBRARIES})
+ list(APPEND TIFF_LIBRARIES ${TIFF_EXTRA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES})
if(UNIX)
list(APPEND TIFF_LIBRARIES m)
endif()