FindImageMagick¶
Finds ImageMagick, a software suite for displaying, converting, and manipulating raster images.
在 3.9 版被加入: Support for ImageMagick 7.
Components¶
This module supports components and searches for a set of ImageMagick tools. Typical components include the names of ImageMagick executables, but are not limited to the following (future versions of ImageMagick may provide additional components not listed here):
animate
compare
composite
conjure
convert
display
identify
import
mogrify
montage
stream
There are also components for the following ImageMagick APIs:
Magick++
Finds the ImageMagick C++ API.
MagickWand
Finds the ImageMagick MagickWand C API.
MagickCore
Finds the ImageMagick MagickCore low-level C API.
Components can be specified using the find_package()
command:
find_package(ImageMagick [COMPONENTS <components>...])
If no components are specified, the module only searches for the ImageMagick executable directory.
Imported Targets¶
This module provides the following Imported Targets:
ImageMagick::Magick++
在 3.26 版被加入.
Target encapsulating the ImageMagick C++ API usage requirements, available if ImageMagick C++ is found.
ImageMagick::MagickWand
在 3.26 版被加入.
Target encapsulating the ImageMagick MagickWand C API usage requirements, available if MagickWand is found.
ImageMagick::MagickCore
在 3.26 版被加入.
Target encapsulating the ImageMagick MagickCore low-level C API usage requirements, available if MagickCore is found.
結果變數¶
This module defines the following variables:
ImageMagick_FOUND
Boolean indicating whether ImageMagick and all its requested components are found.
ImageMagick_VERSION_STRING
The version of ImageMagick found.
備註
Version detection is available only for ImageMagick 6 and later.
ImageMagick_INCLUDE_DIRS
All include directories needed to use ImageMagick.
ImageMagick_LIBRARIES
Libraries needed to link against to use ImageMagick.
ImageMagick_COMPILE_OPTIONS
在 3.26 版被加入.
Compile options of all libraries.
ImageMagick_<component>_FOUND
Boolean indicating whether the ImageMagick
<component>
is found.ImageMagick_<component>_EXECUTABLE
The full path to
<component>
executable.ImageMagick_<component>_INCLUDE_DIRS
Include directories containing headers needed to use the ImageMagick
<component>
.ImageMagick_<component>_COMPILE_OPTIONS
在 3.26 版被加入.
Compile options of the ImageMagick
<component>
.ImageMagick_<component>_LIBRARIES
在 3.31 版被加入.
Libraries needed to link against to use the ImageMagick
<component>
.
快取變數¶
The following cache variables may also be set:
ImageMagick_EXECUTABLE_DIR
The full path to directory containing ImageMagick executables.
範例¶
Finding ImageMagick with its component Magick++
and linking it to a project
target:
find_package(ImageMagick COMPONENTS Magick++)
target_link_libraries(example PRIVATE ImageMagick::Magick++)