From 7b83336a7e572ea543d4b09b69f5fc064c0cb1e7 Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Mon, 26 Aug 2024 12:25:16 -0400 Subject: [PATCH] BUG: Enable system TIFF with modern TIFF and cmake --- Modules/ThirdParty/TIFF/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Modules/ThirdParty/TIFF/CMakeLists.txt b/Modules/ThirdParty/TIFF/CMakeLists.txt index c95b6d100f2..c59acfc01b0 100644 --- a/Modules/ThirdParty/TIFF/CMakeLists.txt +++ b/Modules/ThirdParty/TIFF/CMakeLists.txt @@ -8,17 +8,16 @@ if(ITK_USE_SYSTEM_TIFF) find_package(TIFF REQUIRED) set(ITKTIFF_INCLUDE_DIRS ${ITKTIFF_BINARY_DIR}/src + ${TIFF_INCLUDE_DIRS} ) - set(ITKTIFF_SYSTEM_INCLUDE_DIRS - ${TIFF_INCLUDE_DIR} - ) + set(ITKTIFF_LIBRARIES "${TIFF_LIBRARIES}") set(ITKTIFF_NO_SRC 1) # Check availability of different methods to access TIFF's field # data structure. include(CheckTypeSize) - set(CMAKE_REQUIRED_INCLUDES ${ITKTIFF_SYSTEM_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES TIFF::TIFF) set(CMAKE_EXTRA_INCLUDE_FILES "tiffio.h") check_type_size(TIFFFieldReadCount ITK_TIFF_HAS_TIFFFieldReadCount) check_type_size(TIFFField* ITK_TIFF_HAS_TIFFField)