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 =
6 # the full path to the 'convert' utility
7 # IMAGEMAGICK_MOGRIFY_EXECUTABLE =
8 # the full path to the 'mogrify' utility
9 # IMAGEMAGICK_IMPORT_EXECUTABLE =
10 # the full path to the 'import' utility
11 # IMAGEMAGICK_MONTAGE_EXECUTABLE =
12 # the full path to the 'montage' utility
13 # IMAGEMAGICK_COMPOSITE_EXECUTABLE =
14 # the full path to the 'composite' utility
19 # Try to find the ImageMagick binary path.
21 FIND_PATH(IMAGEMAGICK_BINARY_PATH mogrify.exe
22 [HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]
23 DOC "Path to the ImageMagick binary directory where all executable should be found."
26 # Be extra-careful here: we do NOT want CMake to look in the system's PATH
27 # env var to search for convert.exe, otherwise it is going to pick
28 # Window's own convert.exe, and you may say good-bye to your disk.
30 FIND_PROGRAM(IMAGEMAGICK_CONVERT_EXECUTABLE
32 PATHS ${IMAGEMAGICK_BINARY_PATH}
34 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."
39 SET (IMAGEMAGICK_BINARY_PATH "")
41 FIND_PROGRAM(IMAGEMAGICK_CONVERT_EXECUTABLE
43 PATHS ${IMAGEMAGICK_BINARY_PATH}
44 DOC "Path to ImageMagick's convert executable."
49 # Find mogrify, import, montage, composite
51 FIND_PROGRAM(IMAGEMAGICK_MOGRIFY_EXECUTABLE
53 PATHS ${IMAGEMAGICK_BINARY_PATH}
54 DOC "Path to ImageMagick's mogrify executable."
57 FIND_PROGRAM(IMAGEMAGICK_IMPORT_EXECUTABLE
59 PATHS ${IMAGEMAGICK_BINARY_PATH}
60 DOC "Path to ImageMagick's import executable."
63 FIND_PROGRAM(IMAGEMAGICK_MONTAGE_EXECUTABLE
65 PATHS ${IMAGEMAGICK_BINARY_PATH}
66 DOC "Path to ImageMagick's montage executable."
69 FIND_PROGRAM(IMAGEMAGICK_COMPOSITE_EXECUTABLE
71 PATHS ${IMAGEMAGICK_BINARY_PATH}
72 DOC "Path to ImageMagick's composite executable."
76 IMAGEMAGICK_BINARY_PATH
77 IMAGEMAGICK_CONVERT_EXECUTABLE
78 IMAGEMAGICK_MOGRIFY_EXECUTABLE
79 IMAGEMAGICK_IMPORT_EXECUTABLE
80 IMAGEMAGICK_MONTAGE_EXECUTABLE
81 IMAGEMAGICK_COMPOSITE_EXECUTABLE