FindGIF¶
Finds the Graphics Interchange Format (GIF) library (giflib
):
find_package(GIF [<version>] [...])
Imported Targets¶
This module provides the following Imported Targets:
GIF::GIF
在 3.14 版被加入.
Target that encapsulates the usage requirements of the GIF library, available when the library is found.
結果變數¶
該模組定義了以下變數:
GIF_FOUND
Boolean indicating whether the (requested version of) GIF library was found.
GIF_VERSION
Version string of the GIF library found (for example,
5.1.4
). For GIF library versions prior to 4.1.6, version string will be set only to3
or4
as these versions did not provide version information in their headers.GIF_INCLUDE_DIRS
Include directories needed to use the GIF library.
GIF_LIBRARIES
Libraries needed to link to the GIF library.
快取變數¶
The following cache variables may also be set:
GIF_INCLUDE_DIR
Directory containing the
gif_lib.h
and other GIF library headers.GIF_LIBRARY
Path to the GIF library.
提示¶
This module accepts the following variables:
GIF_DIR
Environment variable that can be set to help locate a GIF library installed in a custom location. It should point to the installation destination that was used when configuring, building, and installing GIF library:
./configure --prefix=$GIF_DIR
.
範例¶
Finding GIF library and linking it to a project target:
find_package(GIF)
target_link_libraries(project_target PRIVATE GIF::GIF)