f9cb51
diff -Nrup a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
f9cb51
--- a/Modules/FindImageMagick.cmake	2014-01-16 12:15:08.000000000 -0500
f9cb51
+++ b/Modules/FindImageMagick.cmake	2016-02-29 23:07:06.439208172 -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
f9cb51
       ImageMagick ImageMagick-6
145919
     DOC "Path to the ImageMagick include dir."
f9cb51
@@ -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