6289c6
diff -up cmake-2.8.11-rc1/Modules/FindImageMagick.cmake.IM_pkgconfig_hints cmake-2.8.11-rc1/Modules/FindImageMagick.cmake
6289c6
--- cmake-2.8.11-rc1/Modules/FindImageMagick.cmake.IM_pkgconfig_hints	2013-03-14 13:10:40.000000000 -0500
6289c6
+++ cmake-2.8.11-rc1/Modules/FindImageMagick.cmake	2013-03-18 09:18:09.453420248 -0500
6289c6
@@ -69,17 +69,24 @@
6289c6
 # (To distribute this file outside of CMake, substitute the full
6289c6
 #  License text for the above reference.)
6289c6
 
6289c6
+find_package(PkgConfig QUIET)
6289c6
+
6289c6
 #---------------------------------------------------------------------
6289c6
 # Helper functions
6289c6
 #---------------------------------------------------------------------
6289c6
 function(FIND_IMAGEMAGICK_API component header)
6289c6
   set(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
6289c6
 
6289c6
+  pkg_check_modules(PC_${component} QUIET ${component})
6289c6
+
6289c6
   find_path(ImageMagick_${component}_INCLUDE_DIR
6289c6
     NAMES ${header}
6289c6
     PATHS
6289c6
       ${ImageMagick_INCLUDE_DIRS}
6289c6
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
6289c6
+    HINTS
6289c6
+      ${PC_${component}_INCLUDEDIR}
6289c6
+      ${PC_${component}_INCLUDE_DIRS}
6289c6
     PATH_SUFFIXES
6289c6
       ImageMagick
6289c6
     DOC "Path to the ImageMagick include dir."
6289c6
@@ -88,6 +95,9 @@ function(FIND_IMAGEMAGICK_API component
6289c6
     NAMES ${ARGN}
6289c6
     PATHS
6289c6
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/lib"
6289c6
+    HINTS
6289c6
+      ${PC_${component}_LIBDIR}
6289c6
+      ${PC_${component}_LIB_DIRS}
6289c6
     DOC "Path to the ImageMagick Magick++ library."
6289c6
     )
6289c6