[CMake] FindImageMagick: Rewrite to support all utilities.

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sat Oct 13 01:17:39 EDT 2007


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.

ImageMagick_convert_EXECUTABLE would have the path to the convert
executable. Note that in the approach I followed, the only CACHE
variable is ImageMagick_EXECUTABLE_DIR the others are not set in the
cache. I don't see an entry for XXX_EXECUTABLE_DIR in the
Modules/readme.txt, but I think it is the appropriate name. Or should
it be XXX_ROOT_DIR in this case?

The variables set in the old ImageMagick module are kept for backward
compatibility.

Let me know if there are any objections to this layout; otherwise I'll
commit the changes.

Thanks,
--Miguel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindImageMagick.cmake
Type: application/octet-stream
Size: 3980 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20071013/c3e095b0/FindImageMagick.obj


More information about the CMake mailing list