--- CMakeLists.txt.orig 2024-02-27 21:40:19 UTC +++ CMakeLists.txt @@ -411,25 +411,25 @@ if (OPTION_USE_LIBTIFF) find_path(TIFF_INCLUDE_DIR tiff.h PATHS ${CMAKE_SOURCE_DIR}/Mac/libtiff/include NO_DEFAULT_PATH) find_library(TIFF_LIBRARY libtiff.a ${CMAKE_SOURCE_DIR}/Mac/libtiff/lib NO_DEFAULT_PATH) else () - find_package(TIFF) - if(TIFF_LIBRARY) - cmake_path(GET TIFF_LIBRARY PARENT_PATH TIFF_RPATH) - message(STATUS "Libtiff run path: '${TIFF_RPATH}'") - list(APPEND RUN_LIBS ${TIFF_RPATH}) - endif() + find_package(TIFF REQUIRED) +# if(TIFF_LIBRARY) +# cmake_path(GET TIFF_LIBRARY PARENT_PATH TIFF_RPATH) +# message(STATUS "Libtiff run path: '${TIFF_RPATH}'") +# list(APPEND RUN_LIBS ${TIFF_RPATH}) +# endif() endif() - if(TIFF_INCLUDE_DIR AND TIFF_LIBRARY) - set(HAVE_LIBTIFF TRUE) - message(STATUS "Found Libtiff: '${TIFF_INCLUDE_DIR}', '${TIFF_LIBRARY}'") - else() - set(HAVE_LIBTIFF FALSE) - message(STATUS "Libtiff include and library variables: '${TIFF_INCLUDE_DIR}', '${TIFF_LIBRARY}'") - message(FATAL_ERROR "Libtiff not found") - endif () +# if(TIFF_INCLUDE_DIR AND TIFF_LIBRARY) +# set(HAVE_LIBTIFF TRUE) +# message(STATUS "Found Libtiff: '${TIFF_INCLUDE_DIR}', '${TIFF_LIBRARY}'") +# else() +# set(HAVE_LIBTIFF FALSE) +# message(STATUS "Libtiff include and library variables: '${TIFF_INCLUDE_DIR}', '${TIFF_LIBRARY}'") +# message(FATAL_ERROR "Libtiff not found") +# endif () include_directories(${TIFF_INCLUDE_DIR}) - list(APPEND DEP_LIBS ${TIFF_LIBRARY}) + list(APPEND DEP_LIBS TIFF::tiff) endif ()