Blame SOURCES/cmake-2.8.12.2-IM_pkgconfig_hints.patch

5cd5b1
diff -Nrup a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
5cd5b1
--- a/Modules/FindImageMagick.cmake	2014-01-16 12:15:08.000000000 -0500
5cd5b1
+++ b/Modules/FindImageMagick.cmake	2016-02-29 23:07:06.439208172 -0500
5cd5b1
@@ -69,17 +69,24 @@
5cd5b1
 # (To distribute this file outside of CMake, substitute the full
5cd5b1
 #  License text for the above reference.)
5cd5b1
 
5cd5b1
+find_package(PkgConfig QUIET)
5cd5b1
+
5cd5b1
 #---------------------------------------------------------------------
5cd5b1
 # Helper functions
5cd5b1
 #---------------------------------------------------------------------
5cd5b1
 function(FIND_IMAGEMAGICK_API component header)
5cd5b1
   set(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
5cd5b1
 
5cd5b1
+  pkg_check_modules(PC_${component} QUIET ${component})
5cd5b1
+
5cd5b1
   find_path(ImageMagick_${component}_INCLUDE_DIR
5cd5b1
     NAMES ${header}
5cd5b1
     PATHS
5cd5b1
       ${ImageMagick_INCLUDE_DIRS}
5cd5b1
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
5cd5b1
+    HINTS
5cd5b1
+      ${PC_${component}_INCLUDEDIR}
5cd5b1
+      ${PC_${component}_INCLUDE_DIRS}
5cd5b1
     PATH_SUFFIXES
5cd5b1
       ImageMagick ImageMagick-6
5cd5b1
     DOC "Path to the ImageMagick include dir."
5cd5b1
@@ -88,6 +95,9 @@ function(FIND_IMAGEMAGICK_API component 
5cd5b1
     NAMES ${ARGN}
5cd5b1
     PATHS
5cd5b1
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/lib"
5cd5b1
+    HINTS
5cd5b1
+      ${PC_${component}_LIBDIR}
5cd5b1
+      ${PC_${component}_LIB_DIRS}
5cd5b1
     DOC "Path to the ImageMagick Magick++ library."
5cd5b1
     )
5cd5b1