fix imagemagick detection
authorMarkus Koschany <apo@gambaru.de>
Sun, 2 Nov 2014 12:44:14 +0000 (13:44 +0100)
committerMarkus Koschany <apo@gambaru.de>
Sun, 2 Nov 2014 12:46:41 +0000 (12:46 +0000)
Fix the detection of the ImageMagick library for Debian systems which use
Multiarch paths. That ensures that ss_extract and ss_cover_conv are built
again.

Forwarded: https://github.com/performous/performous/pull/113

Gbp-Pq: Name fix-imagemagick-detection.patch

tools/CMakeLists.txt

index 50bdd6f34072fef950653453b7236b6f0113d997..d96f1dbb1af343c61d8ca3b455e29f0b0bb27b94 100644 (file)
@@ -21,13 +21,18 @@ if (APPLE)
     find_package(ImageMagick COMPONENTS Magick++)
     include_directories(${ImageMagick_INCLUDE_DIRS})
 else (APPLE)
-    foreach(lib LibXML++ Z Magick++ Jpeg Tiff Png Freetype Z)
+    foreach(lib LibXML++ Z Jpeg Tiff Png Freetype Z)
            find_package(${lib})
        if (${lib}_FOUND)
                include_directories(${${lib}_INCLUDE_DIRS})
                    add_definitions(${${lib}_DEFINITIONS})
        endif (${lib}_FOUND)
     endforeach(lib)
+
+    find_package(ImageMagick COMPONENTS Magick++)
+    find_package(PkgConfig)
+    PKG_CHECK_MODULES(IMAGEMAGICK Magick++ MagickWand MagickCore)
+    include_directories(${ImageMagick_INCLUDE_DIRS})
 endif (APPLE)
 
 # Set default compile flags for GCC