Skip to content
Snippets Groups Projects
Commit 8db97e44 authored by Daniel Engberg's avatar Daniel Engberg
Browse files

science/smoldyn: Fix build with tiff 4.7.0

Use TIFF:tiff to define the library instead of ${TIFF_LIBRARY} and
remove custom logic that tried to replace CMake's own.

PR:		281763
Reviewed by:	yuri
parent 6a1d5ade
No related branches found
No related tags found
No related merge requests found
--- 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 ()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment