FindJPEG¶
Finds the Joint Photographic Experts Group (JPEG) library (libjpeg):
find_package(JPEG [<version>] [...])
Changed in version 3.12: Debug and Release JPEG library variants are now found separately.
Imported Targets¶
This module provides the following Imported Targets:
JPEG::JPEGAdded in version 3.12.
Target encapsulating the JPEG library usage requirements. It is available only when JPEG is found.
Result Variables¶
This module defines the following variables:
JPEG_FOUNDBoolean indicating whether the (requested version of) JPEG library was found.
JPEG_VERSIONAdded in version 3.12.
The version of JPEG library found.
JPEG_INCLUDE_DIRSInclude directories containing headers needed to use JPEG.
JPEG_LIBRARIESLibraries needed to link to JPEG.
Cache Variables¶
The following cache variables may also be set:
JPEG_INCLUDE_DIRDirectory containing the
<jpeglib.h>and related header files.JPEG_LIBRARY_RELEASEAdded in version 3.12.
Path to the release (optimized) variant of the JPEG library.
JPEG_LIBRARY_DEBUGAdded in version 3.12.
Path to the debug variant of the JPEG library.
Deprecated Variables¶
The following variables are provided for backward compatibility:
JPEG_LIBRARYDeprecated since version 3.12: This variable has been superseded by the
JPEG_LIBRARY_RELEASEandJPEG_LIBRARY_DEBUGvariables.Path to the JPEG library.
Examples¶
Finding JPEG library and linking it to a project target:
find_package(JPEG)
target_link_libraries(project_target PRIVATE JPEG::JPEG)