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