# FindTIFF

Finds the TIFF library (`libtiff`). This module also takes into account the upstream TIFF library's exported CMake package configuration, if available.

## Components

This module supports the following components:

`CXX`

  Added in version 3.19.

  Optional component that ensures that the C++ wrapper library (`libtiffxx`) is found.

Components can be specified using the standard syntax:

    find_package(TIFF [COMPONENTS <components>...])

## Imported Targets

This module provides the following Imported Targets:

`TIFF::TIFF`

  Added in version 3.5.

  Target encapsulating the TIFF library usage requirements, available only if the TIFF is found.

`TIFF::CXX`

  Added in version 3.19.

  Target encapsulating the usage requirements for the the C++ wrapper library `libtiffxx`, available only if TIFF is found. This target provides CXX usage requirements only if the compiler is not MSVC. It also has the `TIFF::TIFF` target linked in to simplify its usage.

## Result Variables

This module defines the following variables:

`TIFF_FOUND`

  Boolean indicating whether the TIFF is found.

`TIFF_VERSION_STRING`

  The version of the TIFF library found.

`TIFF_INCLUDE_DIRS`

  The directory containing the TIFF headers.

`TIFF_LIBRARIES`

  TIFF libraries to be linked.

## Cache Variables

The following cache variables may also be set:

`TIFF_INCLUDE_DIR`

  The directory containing the TIFF headers.

`TIFF_LIBRARY_RELEASE`

  Added in version 3.4.

  The path to the TIFF library for release configurations.

`TIFF_LIBRARY_DEBUG`

  Added in version 3.4.

  The path to the TIFF library for debug configurations.

`TIFFXX_LIBRARY_RELEASE`

  Added in version 3.19.

  The path to the TIFFXX library for release configurations.

`TIFFXX_LIBRARY_DEBUG`

  Added in version 3.19.

  The path to the TIFFXX library for debug configurations.

## Examples

Finding TIFF library and linking it to a project target:

    find_package(TIFF)
    target_link_libraries(project_target PRIVATE TIFF::TIFF)

Finding TIFF and TIFFXX libraries by specifying the `CXX` component:

    find_package(TIFF COMPONENTS CXX)
    target_link_libraries(project_target PRIVATE TIFF::CXX)