From 180ceca8bb26bbe97f60c99e5d172eb8ccd66e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 12 Jan 2025 21:45:04 +0100 Subject: [PATCH] Prefer to use pkg-config to detect tiff library. This solves FTBFS with tiff library >= 4.7.0. This resolves issue TDE/tde-packaging#385. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- CMakeLists.txt | 5 ++++- kimgio/CMakeLists.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d6f11106..1628a580d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -854,7 +854,10 @@ set( HAVE_LIBPNG 1 ) ##### check for tiff ############################ if( WITH_TIFF ) - find_package( TIFF ) + pkg_search_module( TIFF libtiff-4 ) + if( NOT TIFF_FOUND ) + find_package( TIFF ) + endif( NOT TIFF_FOUND ) if( NOT TIFF_FOUND ) message(FATAL_ERROR "\ntiff are requested, but not found on your system" ) endif( NOT TIFF_FOUND ) diff --git a/kimgio/CMakeLists.txt b/kimgio/CMakeLists.txt index cd013e588..0e588bcce 100644 --- a/kimgio/CMakeLists.txt +++ b/kimgio/CMakeLists.txt @@ -20,6 +20,7 @@ include_directories( link_directories( ${TDECORE_LIBRARY_DIRS} + ${TIFF_LIBRARY_DIRS} )