FindImageMagick¶
Finds ImageMagick, a software suite for displaying, converting, and manipulating raster images:
find_package(ImageMagick [<version>] [COMPONENTS <components>...] [...])
在 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++在 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.
結果變數¶
該模組定義了以下變數:
ImageMagick_FOUNDBoolean indicating whether (the requested version of) ImageMagick and all its requested components were found.
ImageMagick_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).備註
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_OPTIONS在 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_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_DIRThe full path to directory containing ImageMagick executables.
已棄用的變數¶
The following variables are provided for backward compatibility:
ImageMagick_VERSION_STRING在 4.2 版之後被棄用: Use
ImageMagick_VERSION, which has the same value.The version of ImageMagick found.
範例¶
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++)