diff options
author | Brad King <brad.king@kitware.com> | 2014-07-15 14:48:15 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-07-15 14:48:15 (GMT) |
commit | d3076b1d51c25f076d3dbde7d94e06078040f124 (patch) | |
tree | 2a95288d241539fdd89e7810d42ce0c086248a76 | |
parent | 0bbebd3ca1f5e5dbf68444918d0ea1acc48cb776 (diff) | |
parent | 90245fe86e4c5810034b5ac793609c2ecbfa07b8 (diff) | |
download | CMake-d3076b1d51c25f076d3dbde7d94e06078040f124.zip CMake-d3076b1d51c25f076d3dbde7d94e06078040f124.tar.gz CMake-d3076b1d51c25f076d3dbde7d94e06078040f124.tar.bz2 |
Merge topic 'FindImageMagick-pkgconfig'
90245fe8 FindImageMagick: Use pkgconfig hints if available (#14012)
-rw-r--r-- | Modules/FindImageMagick.cmake | 10 |
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." |