mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 17:12:47 +08:00
[leptonica][tiff] Add LZMA to tiff's dependent libraries. Leptonica should use TIFF_LIBRARIES.
This commit is contained in:
parent
bb226b2acc
commit
24283ec1ee
@ -1,4 +1,4 @@
|
|||||||
Source: leptonica
|
Source: leptonica
|
||||||
Version: 1.74.4-1
|
Version: 1.74.4-2
|
||||||
Description: An open source library containing software that is broadly useful for image processing and image analysis applications
|
Description: An open source library containing software that is broadly useful for image processing and image analysis applications
|
||||||
Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib
|
Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib
|
||||||
|
@ -12,12 +12,16 @@ vcpkg_apply_patches(
|
|||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PATCHES
|
PATCHES
|
||||||
${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch
|
${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/use-tiff-libraries.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
-DSTATIC=${STATIC}
|
||||||
-DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file()
|
-DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
13
ports/leptonica/use-tiff-libraries.patch
Normal file
13
ports/leptonica/use-tiff-libraries.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||||
|
index 3af7e30..55e17da 100644
|
||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -44,7 +44,7 @@ if (PNG_LIBRARY)
|
||||||
|
endif()
|
||||||
|
if (TIFF_LIBRARY)
|
||||||
|
target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR})
|
||||||
|
- target_link_libraries (leptonica ${TIFF_LIBRARY})
|
||||||
|
+ target_link_libraries (leptonica ${TIFF_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
if (WEBP_FOUND)
|
||||||
|
target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIR})
|
@ -159,6 +159,16 @@ macro(find_package name)
|
|||||||
unset(Boost_USE_STATIC_RUNTIME)
|
unset(Boost_USE_STATIC_RUNTIME)
|
||||||
endif()
|
endif()
|
||||||
_find_package(${ARGV})
|
_find_package(${ARGV})
|
||||||
|
|
||||||
|
if("${name}" STREQUAL "TIFF")
|
||||||
|
find_package(LibLZMA)
|
||||||
|
if(TARGET TIFF::TIFF)
|
||||||
|
set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
if(TIFF_LIBRARIES)
|
||||||
|
list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
set(VCPKG_TOOLCHAIN ON)
|
set(VCPKG_TOOLCHAIN ON)
|
||||||
|
Loading…
Reference in New Issue
Block a user