File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ function(lcms2_setup_options)
99 # Tool-specific toggles (only meaningful when LCMS2_BUILD_TOOLS=ON).
1010 option (LCMS2_BUILD_JPGICC "Build jpgicc tool (requires JPEG)" ON )
1111 option (LCMS2_BUILD_TIFICC "Build tificc tool (requires TIFF, optionally ZLIB)" ON )
12+ option (LCMS2_BUILD_TIFFDIFF "Build tiffdiff tool (requires TIFF)" ON )
1213
1314 # Dependency toggles (only consulted when the dependent tool is enabled).
1415 option (LCMS2_WITH_JPEG "Enable JPEG support for tools (find_package only when needed)" ON )
Original file line number Diff line number Diff line change @@ -141,6 +141,30 @@ function(lcms2_add_tools)
141141 endif ()
142142 endif ()
143143
144+ # Optional tiffdiff (requires TIFF).
145+ if (LCMS2_BUILD_TIFFDIFF)
146+ if (LCMS2_WITH_TIFF)
147+ find_package (TIFF )
148+ endif ()
149+
150+ if (TIFF_FOUND)
151+ _lcms2_add_tool (tiffdiff
152+ SOURCES
153+ "${PROJECT_SOURCE_DIR} /utils/tificc/tifdiff.c"
154+ ${_common_sources}
155+ )
156+ if (TARGET TIFF::TIFF)
157+ target_link_libraries (tiffdiff PRIVATE TIFF::TIFF )
158+ else ()
159+ # Do not quote list variables: they may contain debug/optimized keywords.
160+ target_include_directories (tiffdiff PRIVATE ${TIFF_INCLUDE_DIR} )
161+ target_link_libraries (tiffdiff PRIVATE ${TIFF_LIBRARIES} )
162+ endif ()
163+ else ()
164+ message (STATUS "TIFF not found or disabled; skipping tiffdiff" )
165+ endif ()
166+ endif ()
167+
144168 # Manpages (install handled by packaging module).
145169 set (_manpages
146170 "${PROJECT_SOURCE_DIR} /utils/jpgicc/jpgicc.1"
You can’t perform that action at this time.
0 commit comments