diff --git a/ports/libgeotiff/fix-cmake-tiff-detection.patch b/ports/libgeotiff/fix-cmake-tiff-detection.patch new file mode 100644 index 0000000000..166aa7d443 --- /dev/null +++ b/ports/libgeotiff/fix-cmake-tiff-detection.patch @@ -0,0 +1,21 @@ +--- a/CMakeLists.txt 2016-08-12 00:40:12.000000000 +0900 ++++ b/CMakeLists.txt 2018-02-09 13:27:05.721561755 +0900 +@@ -192,7 +192,8 @@ + IF(TIFF_FOUND) + # Confirm required API is available + INCLUDE(CheckFunctionExists) +- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) ++ FIND_PACKAGE(LibLZMA) ++ SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${LIBLZMA_LIBRARIES}) + + CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) + IF(NOT HAVE_TIFFOPEN) +@@ -205,7 +206,7 @@ + SET(TIFF_FOUND) # ReSET to NOT found for TIFF library + MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") + ENDIF() +- ++ SET(CMAKE_REQUIRED_LIBRARIES) + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) + ADD_DEFINITIONS(-DHAVE_TIFF=1) + ENDIF(TIFF_FOUND) diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index 5920a0853e..b974ebc35c 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -13,7 +13,8 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch") + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-cmake-tiff-detection.patch") if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(BUILD_SHARED_LIBS ON) @@ -26,6 +27,10 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DWITH_UTILITIES=OFF + -DWITH_TIFF=ON + -DWITH_PROJ4=ON + -DWITH_ZLIB=ON + -DWITH_JPEG=ON ) vcpkg_build_cmake()