Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/Lcms2Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function(lcms2_setup_options)
# Tool-specific toggles (only meaningful when LCMS2_BUILD_TOOLS=ON).
option(LCMS2_BUILD_JPGICC "Build jpgicc tool (requires JPEG)" ON)
option(LCMS2_BUILD_TIFICC "Build tificc tool (requires TIFF, optionally ZLIB)" ON)
option(LCMS2_BUILD_TIFFDIFF "Build tiffdiff tool (requires TIFF)" ON)

# Dependency toggles (only consulted when the dependent tool is enabled).
option(LCMS2_WITH_JPEG "Enable JPEG support for tools (find_package only when needed)" ON)
Expand Down
24 changes: 24 additions & 0 deletions cmake/Lcms2Tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,30 @@ function(lcms2_add_tools)
endif()
endif()

# Optional tiffdiff (requires TIFF).
if(LCMS2_BUILD_TIFFDIFF)
if(LCMS2_WITH_TIFF)
find_package(TIFF)
endif()

if(TIFF_FOUND)
_lcms2_add_tool(tiffdiff
SOURCES
"${PROJECT_SOURCE_DIR}/utils/tificc/tifdiff.c"
${_common_sources}
)
if(TARGET TIFF::TIFF)
target_link_libraries(tiffdiff PRIVATE TIFF::TIFF)
else()
# Do not quote list variables: they may contain debug/optimized keywords.
target_include_directories(tiffdiff PRIVATE ${TIFF_INCLUDE_DIR})
target_link_libraries(tiffdiff PRIVATE ${TIFF_LIBRARIES})
endif()
else()
message(STATUS "TIFF not found or disabled; skipping tiffdiff")
endif()
endif()

# Manpages (install handled by packaging module).
set(_manpages
"${PROJECT_SOURCE_DIR}/utils/jpgicc/jpgicc.1"
Expand Down
Loading