FindJPEG¶
Finds the Joint Photographic Experts Group (JPEG) library (libjpeg
):
find_package(JPEG [<version>] [...])
在 3.12 版的變更: Debug and Release JPEG library variants are now found separately.
Imported Targets¶
This module provides the following Imported Targets:
JPEG::JPEG
在 3.12 版被加入.
Target encapsulating the JPEG library usage requirements. It is available only when JPEG is found.
結果變數¶
該模組定義了以下變數:
JPEG_FOUND
Boolean indicating whether the (requested version of) JPEG library was found.
JPEG_VERSION
在 3.12 版被加入.
The version of JPEG library found.
JPEG_INCLUDE_DIRS
Include directories containing headers needed to use JPEG.
JPEG_LIBRARIES
Libraries needed to link to JPEG.
快取變數¶
The following cache variables may also be set:
JPEG_INCLUDE_DIR
Directory containing the
<jpeglib.h>
and related header files.JPEG_LIBRARY_RELEASE
在 3.12 版被加入.
Path to the release (optimized) variant of the JPEG library.
JPEG_LIBRARY_DEBUG
在 3.12 版被加入.
Path to the debug variant of the JPEG library.
已棄用的變數¶
The following variables are provided for backward compatibility:
JPEG_LIBRARY
在 3.12 版之後被棄用: This variable has been superseded by the
JPEG_LIBRARY_RELEASE
andJPEG_LIBRARY_DEBUG
variables.Path to the JPEG library.
範例¶
Finding JPEG library and linking it to a project target:
find_package(JPEG)
target_link_libraries(project_target PRIVATE JPEG::JPEG)