Merge lp:~gabipetrovay/zorba/ImageMagick into lp:zorba/image-module

Proposed by Gabriel Petrovay
Status: Merged
Merged at revision: 44
Proposed branch: lp:~gabipetrovay/zorba/ImageMagick
Merge into: lp:zorba/image-module
Diff against target: 246 lines (+19/-209)
2 files modified
cmake_modules/FindImageMagick.cmake (+0/-203)
cmake_modules/Windows/FindImageMagick.cmake (+19/-6)
To merge this branch: bzr merge lp:~gabipetrovay/zorba/ImageMagick
Reviewer Review Type Date Requested Status
Juan Zacarias Pending
Review via email: mp+78717@code.launchpad.net

Description of the change

1. Removed: image/cmake_modules/FindImageMagick.cmake
CMake (2.6 and 2.8) both distribute FindImageMagick.cmake which
successfully find [only] an installed ImageMagick. Therefore this
module is not needed in Zorba.

2. Changed: image/cmake_modules/Windows/FindImageMagick.cmake
- I have replaced the old call to FIND_PACKAGE_DLLS_WIN32 with the new
FIND_PACKAGE_DLL_WIN32
- Added also the search for X11.dll since ImageMagick also requires this one
- removed all the searches for the ImageMagick xml files for the
following reasons:
 - they are not DLLs (they are not needed in the PATH, etc)
 - are they necessary for ImageMagick to work? (Or are they only used
by the ImageMagick GUI:
http://www.imagemagick.org/script/resources.php).
 - even if they can be used by placing them near the Zorba DLLs, the
advanced ImageMagick user will know where to take them from or to
write them.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'cmake_modules/FindImageMagick.cmake'
2--- cmake_modules/FindImageMagick.cmake 2011-10-06 08:18:47 +0000
3+++ cmake_modules/FindImageMagick.cmake 1970-01-01 00:00:00 +0000
4@@ -1,203 +0,0 @@
5-# - Find the ImageMagick binary suite.
6-# This module will search for a set of ImageMagick tools specified
7-# as components in the FIND_PACKAGE call. Typical components include,
8-# but are not limited to (future versions of ImageMagick might have
9-# additional components not listed here):
10-#
11-# animate
12-# compare
13-# composite
14-# conjure
15-# convert
16-# display
17-# identify
18-# import
19-# mogrify
20-# montage
21-# stream
22-#
23-# If no component is specified in the FIND_PACKAGE call, then it only
24-# searches for the ImageMagick executable directory. This code defines
25-# the following variables:
26-#
27-# ImageMagick_FOUND - TRUE if all components are found.
28-# ImageMagick_EXECUTABLE_DIR - Full path to executables directory.
29-# ImageMagick_<component>_FOUND - TRUE if <component> is found.
30-# ImageMagick_<component>_EXECUTABLE - Full path to <component> executable.
31-#
32-# There are also components for the following ImageMagick APIs:
33-#
34-# Magick++
35-# MagickWand
36-# MagickCore
37-#
38-# For these components the following variables are set:
39-#
40-# ImageMagick_FOUND - TRUE if all components are found.
41-# ImageMagick_INCLUDE_DIRS - Full paths to all include dirs.
42-# ImageMagick_LIBRARIES - Full paths to all libraries.
43-# ImageMagick_<component>_FOUND - TRUE if <component> is found.
44-# ImageMagick_<component>_INCLUDE_DIRS - Full path to <component> include dirs.
45-# ImageMagick_<component>_LIBRARIES - Full path to <component> libraries.
46-#
47-# Example Usages:
48-# FIND_PACKAGE(ImageMagick)
49-# FIND_PACKAGE(ImageMagick COMPONENTS convert)
50-# FIND_PACKAGE(ImageMagick COMPONENTS convert mogrify display)
51-# FIND_PACKAGE(ImageMagick COMPONENTS Magick++)
52-# FIND_PACKAGE(ImageMagick COMPONENTS Magick++ convert)
53-#
54-# Note that the standard FIND_PACKAGE features are supported
55-# (i.e., QUIET, REQUIRED, etc.).
56-
57-#=============================================================================
58-# Copyright 2007-2009 Kitware, Inc.
59-# Copyright 2007-2008 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org>
60-#
61-# Distributed under the OSI-approved BSD License (the "License");
62-# see accompanying file Copyright.txt for details.
63-#
64-# This software is distributed WITHOUT ANY WARRANTY; without even the
65-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
66-# See the License for more information.
67-#=============================================================================
68-# (To distributed this file outside of CMake, substitute the full
69-# License text for the above reference.)
70-
71-#---------------------------------------------------------------------
72-# Helper functions
73-#---------------------------------------------------------------------
74-FUNCTION(FIND_IMAGEMAGICK_API component header)
75- SET(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
76-
77- FIND_PATH(ImageMagick_${component}_INCLUDE_DIR
78- NAMES ${header}
79- PATHS
80- ${ImageMagick_INCLUDE_DIRS}
81- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
82- PATH_SUFFIXES
83- ImageMagick
84- DOC "Path to the ImageMagick include dir."
85- )
86- FIND_LIBRARY(ImageMagick_${component}_LIBRARY
87- NAMES ${ARGN}
88- PATHS
89- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/lib"
90- DOC "Path to the ImageMagick Magick++ library."
91- )
92-
93- IF(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
94- SET(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
95-
96- LIST(APPEND ImageMagick_INCLUDE_DIRS
97- ${ImageMagick_${component}_INCLUDE_DIR}
98- )
99- LIST(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
100- SET(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)
101-
102- LIST(APPEND ImageMagick_LIBRARIES
103- ${ImageMagick_${component}_LIBRARY}
104- )
105- SET(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES} PARENT_SCOPE)
106- ENDIF(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
107-ENDFUNCTION(FIND_IMAGEMAGICK_API)
108-
109-FUNCTION(FIND_IMAGEMAGICK_EXE component)
110- SET(_IMAGEMAGICK_EXECUTABLE
111- ${ImageMagick_EXECUTABLE_DIR}/${component}${CMAKE_EXECUTABLE_SUFFIX})
112- IF(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
113- SET(ImageMagick_${component}_EXECUTABLE
114- ${_IMAGEMAGICK_EXECUTABLE}
115- PARENT_SCOPE
116- )
117- SET(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
118- ELSE(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
119- SET(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
120- ENDIF(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
121-ENDFUNCTION(FIND_IMAGEMAGICK_EXE)
122-
123-#---------------------------------------------------------------------
124-# Start Actual Work
125-#---------------------------------------------------------------------
126-# Try to find a ImageMagick installation binary path.
127-FIND_PATH(ImageMagick_EXECUTABLE_DIR
128- NAMES mogrify${CMAKE_EXECUTABLE_SUFFIX}
129- PATHS
130- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]"
131- DOC "Path to the ImageMagick binary directory."
132- NO_DEFAULT_PATH
133- )
134-FIND_PATH(ImageMagick_EXECUTABLE_DIR
135- NAMES mogrify${CMAKE_EXECUTABLE_SUFFIX}
136- )
137-
138-# Find each component. Search for all tools in same dir
139-# <ImageMagick_EXECUTABLE_DIR>; otherwise they should be found
140-# independently and not in a cohesive module such as this one.
141-SET(ImageMagick_FOUND TRUE)
142-FOREACH(component ${ImageMagick_FIND_COMPONENTS}
143- # DEPRECATED: forced components for backward compatibility
144- convert mogrify import montage composite
145- )
146- IF(component STREQUAL "Magick++")
147- FIND_IMAGEMAGICK_API(Magick++ Magick++.h
148- Magick++ CORE_RL_Magick++_
149- )
150- ELSEIF(component STREQUAL "MagickWand")
151- FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h
152- Wand MagickWand CORE_RL_wand_
153- )
154- ELSEIF(component STREQUAL "MagickCore")
155- FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
156- Magick MagickCore CORE_RL_magick_
157- )
158- ELSE(component STREQUAL "Magick++")
159- IF(ImageMagick_EXECUTABLE_DIR)
160- FIND_IMAGEMAGICK_EXE(${component})
161- ENDIF(ImageMagick_EXECUTABLE_DIR)
162- ENDIF(component STREQUAL "Magick++")
163-
164- IF(NOT ImageMagick_${component}_FOUND)
165- LIST(FIND ImageMagick_FIND_COMPONENTS ${component} is_requested)
166- IF(is_requested GREATER -1)
167- SET(ImageMagick_FOUND FALSE)
168- ENDIF(is_requested GREATER -1)
169- ENDIF(NOT ImageMagick_${component}_FOUND)
170-ENDFOREACH(component)
171-
172-SET(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS})
173-SET(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES})
174-
175-#---------------------------------------------------------------------
176-# Standard Package Output
177-#---------------------------------------------------------------------
178-INCLUDE(FindPackageHandleStandardArgs)
179-FIND_PACKAGE_HANDLE_STANDARD_ARGS(
180- ImageMagick DEFAULT_MSG ImageMagick_FOUND
181- )
182-# Maintain consistency with all other variables.
183-SET(ImageMagick_FOUND ${IMAGEMAGICK_FOUND})
184-
185-#---------------------------------------------------------------------
186-# DEPRECATED: Setting variables for backward compatibility.
187-#---------------------------------------------------------------------
188-SET(IMAGEMAGICK_BINARY_PATH ${ImageMagick_EXECUTABLE_DIR}
189- CACHE PATH "Path to the ImageMagick binary directory.")
190-SET(IMAGEMAGICK_CONVERT_EXECUTABLE ${ImageMagick_convert_EXECUTABLE}
191- CACHE FILEPATH "Path to ImageMagick's convert executable.")
192-SET(IMAGEMAGICK_MOGRIFY_EXECUTABLE ${ImageMagick_mogrify_EXECUTABLE}
193- CACHE FILEPATH "Path to ImageMagick's mogrify executable.")
194-SET(IMAGEMAGICK_IMPORT_EXECUTABLE ${ImageMagick_import_EXECUTABLE}
195- CACHE FILEPATH "Path to ImageMagick's import executable.")
196-SET(IMAGEMAGICK_MONTAGE_EXECUTABLE ${ImageMagick_montage_EXECUTABLE}
197- CACHE FILEPATH "Path to ImageMagick's montage executable.")
198-SET(IMAGEMAGICK_COMPOSITE_EXECUTABLE ${ImageMagick_composite_EXECUTABLE}
199- CACHE FILEPATH "Path to ImageMagick's composite executable.")
200-MARK_AS_ADVANCED(
201- IMAGEMAGICK_BINARY_PATH
202- IMAGEMAGICK_CONVERT_EXECUTABLE
203- IMAGEMAGICK_MOGRIFY_EXECUTABLE
204- IMAGEMAGICK_IMPORT_EXECUTABLE
205- IMAGEMAGICK_MONTAGE_EXECUTABLE
206- IMAGEMAGICK_COMPOSITE_EXECUTABLE
207- )
208
209=== modified file 'cmake_modules/Windows/FindImageMagick.cmake'
210--- cmake_modules/Windows/FindImageMagick.cmake 2011-08-19 00:03:49 +0000
211+++ cmake_modules/Windows/FindImageMagick.cmake 2011-10-08 15:26:24 +0000
212@@ -22,13 +22,26 @@
213 #
214 # See the FindLibTidy.cmake module shipped with Zorba for more information.
215
216-FIND_PACKAGE_WIN32(NAME ImageMagick FOUND_VAR ImageMagick_FOUND SEARCH_NAMES ImageMagick COMPONENTS Magick++ MagickCore MagickWand)
217+FIND_PACKAGE_WIN32 (NAME ImageMagick FOUND_VAR ImageMagick_FOUND SEARCH_NAMES ImageMagick COMPONENTS Magick++ MagickCore MagickWand)
218
219 IF (ImageMagick_FOUND)
220
221 #find the needed DLL's
222- FIND_PACKAGE_DLLS_WIN32 (${FOUND_LOCATION} "config/colors.xml;config/coder.xml;config/configure.xml;config/delegates.xml;config/english.xml;config/locale.xml;config/log.xml;config/magic.xml;config/mime.xml;config/thresholds.xml;config/type.xml;config/type-ghostscript.xml;CORE_RL_tiff_.dll;CORE_RL_png_.dll;CORE_RL_libxml_.dll;CORE_RL_jbig_.dll;CORE_RL_jp2_.dll;CORE_RL_jpeg_.dll;CORE_RL_Magick++_.dll;CORE_RL_bzlib_.dll;CORE_RL_lcms_.dll;CORE_RL_ttf_.dll;CORE_RL_xlib_.dll;CORE_RL_zlib_.dll;CORE_RL_magick_.dll;CORE_RL_wand_.dll")
223-
224-ENDIF (ImageMagick_FOUND)
225-
226-
227\ No newline at end of file
228+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_bzlib_")
229+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_jbig_")
230+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_jp2_")
231+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_jpeg_")
232+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_lcms_")
233+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_libxml_")
234+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_Magick++_")
235+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_magick_")
236+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_png_")
237+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_tiff_")
238+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_ttf_")
239+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_wand_")
240+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_xlib_")
241+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "CORE_RL_zlib_")
242+
243+ FIND_PACKAGE_DLL_WIN32 (${FOUND_LOCATION} "X11")
244+
245+ENDIF (ImageMagick_FOUND)
246\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: