FindTIFF¶
Finds the TIFF library (libtiff):
find_package(TIFF [<version>] [COMPONENTS <components>...] [...])
This module also takes into account the upstream TIFF library's exported CMake package configuration, if available.
Components¶
This module supports optional components which can be specified with:
find_package(TIFF [COMPONENTS <components>...])
Supported components include:
CXX在 3.19 版被加入.
Optional component that ensures that the C++ wrapper library (
libtiffxx) is found.
Imported Targets¶
This module provides the following Imported Targets:
TIFF::TIFF在 3.5 版被加入.
Target encapsulating the TIFF library usage requirements, available only if the TIFF is found.
TIFF::CXX在 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 theTIFF::TIFFtarget linked in to simplify its usage.
結果變數¶
該模組定義了以下變數:
TIFF_FOUNDBoolean indicating whether (the requested version of) TIFF is found.
TIFF_VERSION在 4.2 版被加入.
The version of TIFF library found.
TIFF_INCLUDE_DIRSThe directory containing the TIFF headers.
TIFF_LIBRARIESTIFF libraries to be linked.
快取變數¶
The following cache variables may also be set:
TIFF_INCLUDE_DIRThe directory containing the TIFF headers.
TIFF_LIBRARY_RELEASE在 3.4 版被加入.
The path to the TIFF library for release configurations.
TIFF_LIBRARY_DEBUG在 3.4 版被加入.
The path to the TIFF library for debug configurations.
TIFFXX_LIBRARY_RELEASE在 3.19 版被加入.
The path to the TIFFXX library for release configurations.
TIFFXX_LIBRARY_DEBUG在 3.19 版被加入.
The path to the TIFFXX library for debug configurations.
已棄用的變數¶
The following variables are provided for backward compatibility:
TIFF_VERSION_STRING在 4.2 版之後被棄用: Superseded by the
TIFF_VERSION.The version of TIFF library found.
範例¶
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)