2 # This module finds if ImageMagick tools are installed and determines
3 # where the executables are. This code sets the following variables:
5 # IMAGEMAGICK_CONVERT_EXECUTABLE = the full path to the 'convert' utility
6 # IMAGEMAGICK_MOGRIFY_EXECUTABLE = the full path to the 'mogrify' utility
7 # IMAGEMAGICK_IMPORT_EXECUTABLE = the full path to the 'import' utility
8 # IMAGEMAGICK_MONTAGE_EXECUTABLE = the full path to the 'montage' utility
9 # IMAGEMAGICK_COMPOSITE_EXECUTABLE = the full path to the 'composite' utility
14 # Try to find the ImageMagick binary path.
16 FIND_PATH(IMAGEMAGICK_BINARY_PATH mogrify.exe
17 [HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]
18 DOC "Path to the ImageMagick binary directory where all executable should be found."
21 # Be extra-careful here: we do NOT want CMake to look in the system's PATH
22 # env var to search for convert.exe, otherwise it is going to pick
23 # Window's own convert.exe, and you may say good-bye to your disk.
25 FIND_PROGRAM(IMAGEMAGICK_CONVERT_EXECUTABLE
27 PATHS ${IMAGEMAGICK_BINARY_PATH}
29 DOC "Path to ImageMagick's convert executable. WARNING: note that this tool, named convert.exe, conflicts with Microsoft Window's own convert.exe, which is used to convert FAT partitions to NTFS format ! Therefore, be extra-careful and make sure the right convert.exe has been picked."
34 SET (IMAGEMAGICK_BINARY_PATH "")
36 FIND_PROGRAM(IMAGEMAGICK_CONVERT_EXECUTABLE
38 PATHS ${IMAGEMAGICK_BINARY_PATH}
39 DOC "Path to ImageMagick's convert executable."
44 # Find mogrify, import, montage, composite
46 FIND_PROGRAM(IMAGEMAGICK_MOGRIFY_EXECUTABLE
48 PATHS ${IMAGEMAGICK_BINARY_PATH}
49 DOC "Path to ImageMagick's mogrify executable."
52 FIND_PROGRAM(IMAGEMAGICK_IMPORT_EXECUTABLE
54 PATHS ${IMAGEMAGICK_BINARY_PATH}
55 DOC "Path to ImageMagick's import executable."
58 FIND_PROGRAM(IMAGEMAGICK_MONTAGE_EXECUTABLE
60 PATHS ${IMAGEMAGICK_BINARY_PATH}
61 DOC "Path to ImageMagick's montage executable."
64 FIND_PROGRAM(IMAGEMAGICK_COMPOSITE_EXECUTABLE
66 PATHS ${IMAGEMAGICK_BINARY_PATH}
67 DOC "Path to ImageMagick's composite executable."
71 IMAGEMAGICK_BINARY_PATH
72 IMAGEMAGICK_CONVERT_EXECUTABLE
73 IMAGEMAGICK_MOGRIFY_EXECUTABLE
74 IMAGEMAGICK_IMPORT_EXECUTABLE
75 IMAGEMAGICK_MONTAGE_EXECUTABLE
76 IMAGEMAGICK_COMPOSITE_EXECUTABLE