FindImageMagick¶
Finds ImageMagick, a software suite for displaying, converting, and manipulating raster images:
find_package(ImageMagick [<version>] [COMPONENTS <components>...] [...])
Added in version 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):
animatecomparecompositeconjureconvertdisplayidentifyimportmogrifymontagestream
There are also components for the following ImageMagick APIs:
Magick++Finds the ImageMagick C++ API.
MagickWandFinds the ImageMagick MagickWand C API.
MagickCoreFinds 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++Added in version 3.26.
Target encapsulating the ImageMagick C++ API usage requirements, available if ImageMagick C++ is found.
ImageMagick::MagickWandAdded in version 3.26.
Target encapsulating the ImageMagick MagickWand C API usage requirements, available if MagickWand is found.
ImageMagick::MagickCoreAdded in version 3.26.
Target encapsulating the ImageMagick MagickCore low-level C API usage requirements, available if MagickCore is found.
Result Variables¶
This module defines the following variables:
ImageMagick_FOUNDBoolean indicating whether (the requested version of) ImageMagick and all its requested components were found.
ImageMagick_VERSIONAdded in version 4.2.
The version of ImageMagick found in form of
<major>.<minor>.<patch>-<addendum>(e.g.,6.9.12-98, where98is the addendum release number).Note
Version detection is available only for ImageMagick 6 and later.
ImageMagick_INCLUDE_DIRSAll include directories needed to use ImageMagick.
ImageMagick_LIBRARIESLibraries needed to link against to use ImageMagick.
ImageMagick_COMPILE_OPTIONSAdded in version 3.26.
Compile options of all libraries.
ImageMagick_<component>_FOUNDBoolean indicating whether the ImageMagick
<component>is found.ImageMagick_<component>_EXECUTABLEThe full path to
<component>executable.ImageMagick_<component>_INCLUDE_DIRSInclude directories containing headers needed to use the ImageMagick
<component>.ImageMagick_<component>_COMPILE_OPTIONSAdded in version 3.26.
Compile options of the ImageMagick
<component>.ImageMagick_<component>_LIBRARIESAdded in version 3.31.
Libraries needed to link against to use the ImageMagick
<component>.
Cache Variables¶
The following cache variables may also be set:
ImageMagick_EXECUTABLE_DIRThe full path to directory containing ImageMagick executables.
Deprecated Variables¶
The following variables are provided for backward compatibility:
ImageMagick_VERSION_STRINGDeprecated since version 4.2: Use
ImageMagick_VERSION, which has the same value.The version of ImageMagick found.
Examples¶
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++)