FindImageMagick: Find arch include dir (#15007)

This commit is contained in:
bastien ROUCARIES 2014-07-22 22:24:15 +02:00 committed by Brad King
parent 5c38fc1628
commit 6f5581c105
1 changed files with 18 additions and 1 deletions

View File

@ -115,7 +115,19 @@ function(FIND_IMAGEMAGICK_API component header)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
PATH_SUFFIXES
ImageMagick ImageMagick-6
DOC "Path to the ImageMagick include dir."
DOC "Path to the ImageMagick arch-independent include dir."
)
find_path(ImageMagick_${component}_ARCH_INCLUDE_DIR
NAMES magick/magick-baseconfig.h
HINTS
${PC_${component}_INCLUDEDIR}
${PC_${component}_INCLUDE_DIRS}
PATHS
${ImageMagick_INCLUDE_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
PATH_SUFFIXES
ImageMagick ImageMagick-6
DOC "Path to the ImageMagick arch-specific include dir."
)
find_library(ImageMagick_${component}_LIBRARY
NAMES ${ARGN}
@ -127,12 +139,17 @@ function(FIND_IMAGEMAGICK_API component header)
DOC "Path to the ImageMagick Magick++ library."
)
# old version have only indep dir
if(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
set(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
list(APPEND ImageMagick_INCLUDE_DIRS
${ImageMagick_${component}_INCLUDE_DIR}
)
if(ImageMagick_${component}_ARCH_INCLUDE_DIR)
list(APPEND ImageMagick_INCLUDE_DIRS
${ImageMagick_${component}_ARCH_INCLUDE_DIR})
endif()
list(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)