# FindImageMagick

Find ImageMagick, software suite for displaying, converting and manipulating raster images.

Added in version 3.9: Added support for ImageMagick 7.

This module will search for a set of ImageMagick tools specified as components in the `find_package()` call. Typical components include, but are not limited to (future versions of ImageMagick might have additional components not listed here):

- `animate`

- `compare`

- `composite`

- `conjure`

- `convert`

- `display`

- `identify`

- `import`

- `mogrify`

- `montage`

- `stream`

If no component is specified in the `find_package()` call, then it only searches for the ImageMagick executable directory.

There are also components for the following ImageMagick APIs:

- `Magick++`: ImageMagick C++ API, if found.

- `MagickWand`: ImageMagick MagickWand C API, if found.

- `MagickCore`: ImageMagick MagickCore low-level C API, if found.

## Imported targets

Added in version 3.26.

This module defines the following `IMPORTED` targets:

`ImageMagick::Magick++`

  ImageMagick C++ API, if found.

`ImageMagick::MagickWand`

  ImageMagick MagickWand C API, if found.

`ImageMagick::MagickCore`

  ImageMagick MagickCore low-level C API, if found.

## Result Variables

`ImageMagick_FOUND`

  TRUE if all components are found.

`ImageMagick_EXECUTABLE_DIR`

  Full path to executables directory.

`ImageMagick_INCLUDE_DIRS`

  Full paths to all include dirs.

`ImageMagick_LIBRARIES`

  Full paths to all libraries.

`ImageMagick_COMPILE_OPTIONS`

  Compile options of all libraries.

`ImageMagick_VERSION_STRING`

  The version of ImageMagick found (since CMake 2.8.8). Will not work for old versions like 5.2.3.

`ImageMagick_<component>_FOUND`

  TRUE if <component> is found.

`ImageMagick_<component>_EXECUTABLE`

  Full path to <component> executable.

`ImageMagick_<component>_INCLUDE_DIRS`

  Full path to <component> include dirs.

`ImageMagick_<component>_COMPILE_OPTIONS`

  Added in version 3.26.

  Compile options of <component>.

`ImageMagick_<component>_LIBRARIES`

  Added in version 3.31.

  Full path to <component> libraries.

## Example Usage

    find_package(ImageMagick COMPONENTS Magick++)
    target_link_libraries(example PRIVATE ImageMagick::Magick++)