FindImageMagick: Find arch include dir (#15007)
This commit is contained in:
parent
5c38fc1628
commit
6f5581c105
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue