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