diff options
| author | Hiroshi Miura <miurahr@linux.com> | 2018-08-03 16:14:51 +0900 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-08-03 00:14:51 -0700 |
| commit | 3eeaf564d1714ee533c59e7c79cf5e19a1b4e983 (patch) | |
| tree | 84e5bd12d1eb98ccc4bd8b89d22cd11ab979c665 /ports/tiff | |
| parent | 09ccd053dbb0b48833fa82331d1fbdccd9cb054a (diff) | |
| download | vcpkg-3eeaf564d1714ee533c59e7c79cf5e19a1b4e983.tar.gz vcpkg-3eeaf564d1714ee533c59e7c79cf5e19a1b4e983.zip | |
[libgeotiff] support linux build (#3843)
* [libgeotiff] fix compile on linux
Fix cmake libtiff functions detetion failure
caused by finding no functions in libm.
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
* [libgeotiff] fix utility binary handling in linux
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
* [tiff] Fix static transitive dependencies
* [libgeotiff] Fix .dll and .exe manipulation
* [leptonica] Find dependencies in installed cmake config file
* [tiff] Do not add cmake targets to TIFF_LIBRARIES
* [tiff] Link consumers against m on unix platforms
Diffstat (limited to 'ports/tiff')
| -rw-r--r-- | ports/tiff/CONTROL | 2 | ||||
| -rw-r--r-- | ports/tiff/portfile.cmake | 6 | ||||
| -rw-r--r-- | ports/tiff/vcpkg-cmake-wrapper.cmake | 24 |
3 files changed, 31 insertions, 1 deletions
diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index 7a91d1d5b..710b7a1c2 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,4 +1,4 @@ Source: tiff -Version: 4.0.9 +Version: 4.0.9-4 Build-Depends: zlib, libjpeg-turbo, liblzma (windows) Description: A library that supports the manipulation of TIFF image files diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index e14079c31..5ff4baa92 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -42,6 +42,12 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share ) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/tiff) +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/tiff + @ONLY +) file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff diff --git a/ports/tiff/vcpkg-cmake-wrapper.cmake b/ports/tiff/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..fed3875b8 --- /dev/null +++ b/ports/tiff/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,24 @@ +_find_package(${ARGS})
+
+if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
+ set(TIFF_EXTRA_LIBRARIES)
+ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ find_package(LibLZMA)
+ list(APPEND TIFF_EXTRA_LIBRARIES ${LIBLZMA_LIBRARIES})
+ 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)
+ endif()
+ if(TIFF_LIBRARIES)
+ list(APPEND TIFF_LIBRARIES ${TIFF_EXTRA_LIBRARIES} ${ZLIB_LIBRARIES})
+ if(UNIX)
+ list(APPEND TIFF_LIBRARIES m)
+ endif()
+ endif()
+endif()
|
