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