mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 10:59:00 +08:00
fix tiff detection error when static build
This commit is contained in:
parent
f68711ed02
commit
fc888e4617
21
ports/libgeotiff/fix-cmake-tiff-detection.patch
Normal file
21
ports/libgeotiff/fix-cmake-tiff-detection.patch
Normal file
@ -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)
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user