From 419a49c67ba0f4ca3db88ff16bc030c6fbdfd6f1 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 17 Apr 2025 13:57:30 +0200 Subject: FindImageMagick: Update documentation - Synced module documentation with other similar find modules. - Removed CMake 2.8.8 version info as these are now being cleaned from the CMake 4 documentation. - Added some additional versionadded directives for those items that were added after the CMake 3.0.0 module state. - Added separate components section. - Reworded few descriptions. --- Modules/FindImageMagick.cmake | 104 +++++++++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 36 deletions(-) diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake index ff0a6a6..8289d6d 100644 --- a/Modules/FindImageMagick.cmake +++ b/Modules/FindImageMagick.cmake @@ -5,17 +5,19 @@ FindImageMagick --------------- -Find ImageMagick, software suite for displaying, converting and -manipulating raster images. - +Finds ImageMagick, a software suite for displaying, converting, and manipulating +raster images. .. versionadded:: 3.9 - Added support for ImageMagick 7. + Support for ImageMagick 7. + +Components +^^^^^^^^^^ -This module will search for a set of ImageMagick tools specified as -components in the :command:`find_package` call. Typical components include, -but are not limited to (future versions of ImageMagick might have -additional components not listed here): +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`` @@ -29,77 +31,107 @@ additional components not listed here): * ``montage`` * ``stream`` -If no component is specified in the :command:`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. +``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 :command:`find_package` command: + +.. code-block:: cmake + + find_package(ImageMagick [COMPONENTS ...]) +If no components are specified, the module only searches for the ImageMagick +executable directory. Imported Targets ^^^^^^^^^^^^^^^^ -.. versionadded:: 3.26 - -This module defines the following :prop_tgt:`IMPORTED` targets: +This module provides the following :ref:`Imported Targets`: ``ImageMagick::Magick++`` - ImageMagick C++ API, if found. + .. versionadded:: 3.26 + + Target encapsulating the ImageMagick C++ API usage requirements, available if + ImageMagick C++ is found. ``ImageMagick::MagickWand`` - ImageMagick MagickWand C API, if found. + .. versionadded:: 3.26 + + Target encapsulating the ImageMagick MagickWand C API usage requirements, + available if MagickWand is found. ``ImageMagick::MagickCore`` - ImageMagick MagickCore low-level C API, if found. + .. versionadded:: 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_FOUND`` - TRUE if all components are found. + Boolean indicating whether ImageMagick and all its requested components are + found. -``ImageMagick_EXECUTABLE_DIR`` - Full path to executables directory. +``ImageMagick_VERSION_STRING`` + The version of ImageMagick found. + + .. note:: + + Version detection is available only for ImageMagick 6 and later. ``ImageMagick_INCLUDE_DIRS`` - Full paths to all include dirs. + All include directories needed to use ImageMagick. ``ImageMagick_LIBRARIES`` - Full paths to all libraries. + Libraries needed to link against to use ImageMagick. ``ImageMagick_COMPILE_OPTIONS`` - Compile options of all libraries. + .. versionadded:: 3.26 -``ImageMagick_VERSION_STRING`` - The version of ImageMagick found (since CMake 2.8.8). - Will not work for old versions like 5.2.3. + Compile options of all libraries. ``ImageMagick__FOUND`` - TRUE if is found. + Boolean indicating whether the ImageMagick ```` is found. ``ImageMagick__EXECUTABLE`` - Full path to executable. + The full path to ```` executable. ``ImageMagick__INCLUDE_DIRS`` - Full path to include dirs. + Include directories containing headers needed to use the ImageMagick + ````. ``ImageMagick__COMPILE_OPTIONS`` .. versionadded:: 3.26 - Compile options of . + Compile options of the ImageMagick ````. ``ImageMagick__LIBRARIES`` .. versionadded:: 3.31 - Full path to libraries. + Libraries needed to link against to use the ImageMagick ````. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``ImageMagick_EXECUTABLE_DIR`` + The full path to directory containing ImageMagick executables. +Examples +^^^^^^^^ -Example Usage -^^^^^^^^^^^^^ +Finding ImageMagick with its component ``Magick++`` and linking it to a project +target: .. code-block:: cmake -- cgit v0.12