summaryrefslogtreecommitdiffstats
path: root/Modules/FindImageMagick.cmake
diff options
context:
space:
mode:
authorRex Dieter <rdieter@fedoraproject.org>2014-07-14 19:04:13 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-14 19:05:28 (GMT)
commit90245fe86e4c5810034b5ac793609c2ecbfa07b8 (patch)
tree2a14e4475b2246d26062b05b12f37bc1161e6b54 /Modules/FindImageMagick.cmake
parentc72642f927e65e66f602406380349f928a961e77 (diff)
downloadCMake-90245fe86e4c5810034b5ac793609c2ecbfa07b8.zip
CMake-90245fe86e4c5810034b5ac793609c2ecbfa07b8.tar.gz
CMake-90245fe86e4c5810034b5ac793609c2ecbfa07b8.tar.bz2
FindImageMagick: Use pkgconfig hints if available (#14012)
Tested-by: bastien ROUCARIES <roucaries.bastien@gmail.com>
Diffstat (limited to 'Modules/FindImageMagick.cmake')
-rw-r--r--Modules/FindImageMagick.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index 4f0e687..f6c8b3a 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -95,14 +95,21 @@
# (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}
+ HINTS
+ ${PC_${component}_INCLUDEDIR}
+ ${PC_${component}_INCLUDE_DIRS}
PATHS
${ImageMagick_INCLUDE_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
@@ -112,6 +119,9 @@ function(FIND_IMAGEMAGICK_API component header)
)
find_library(ImageMagick_${component}_LIBRARY
NAMES ${ARGN}
+ HINTS
+ ${PC_${component}_LIBDIR}
+ ${PC_${component}_LIB_DIRS}
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/lib"
DOC "Path to the ImageMagick Magick++ library."