[CMake] FindImageMagick: Rewrite to support all utilities.

a.neundorf-work at gmx.net a.neundorf-work at gmx.net
Sun Oct 14 17:19:27 EDT 2007


On Saturday 13 October 2007 07:17, Miguel A. Figueroa-Villanueva wrote:
> Hello,
>
> I've been assigned the task of maintaining the ImageMagick find
> module. As such, I made a rewrite to support the complete toolchain
> (i.e., all command line executables) and would like to ask for user
> feedback before committing the changes. The new module is attached for
> reference.
>
> The pattern that I'm using for this find module comes up a few times,
> for example FindLATEX could use it. Instead of hard-coding the tools
> to search for I use the COMPONENTS argument in of the FIND_PACKAGE
> command. For example, if I need ImageMagick's convert I would do:
>
> FIND_PACKAGE(ImageMagick COMPONENTS convert)
>
> If found the following variables will be set:
>
> #  ImageMagick_FOUND - TRUE if all components are found.
> #  ImageMagick_EXECUTABLE_DIR - Full path to executables directory.
> #  ImageMagick_<component>_FOUND - TRUE if <component> is found.
> #  ImageMagick_<component>_EXECUTABLE - Full path to <component>
> executable.

Why do you use FIND_PATH() instead of FIND_PROGRAM() ?
Then you wouldn't have to care for the different suffixes.

Bye
Alex


More information about the CMake mailing list