FindImageMagick: Provide per-component include dirs (#15007)

Set the ImageMagick_<component>_INCLUDE_DIRS variable that is mentioned
in the documentation but was not set before.
This commit is contained in:
Brad King 2014-07-23 15:33:48 -04:00
parent 6f5581c105
commit 1342e0222f
1 changed files with 9 additions and 2 deletions

View File

@ -143,13 +143,20 @@ function(FIND_IMAGEMAGICK_API component header)
if(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY) if(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
set(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE) set(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
list(APPEND ImageMagick_INCLUDE_DIRS # Construct per-component include directories.
set(ImageMagick_${component}_INCLUDE_DIRS
${ImageMagick_${component}_INCLUDE_DIR} ${ImageMagick_${component}_INCLUDE_DIR}
) )
if(ImageMagick_${component}_ARCH_INCLUDE_DIR) if(ImageMagick_${component}_ARCH_INCLUDE_DIR)
list(APPEND ImageMagick_INCLUDE_DIRS list(APPEND ImageMagick_${component}_INCLUDE_DIRS
${ImageMagick_${component}_ARCH_INCLUDE_DIR}) ${ImageMagick_${component}_ARCH_INCLUDE_DIR})
endif() endif()
list(REMOVE_DUPLICATES ImageMagick_${component}_INCLUDE_DIRS)
set(ImageMagick_${component}_INCLUDE_DIRS
${ImageMagick_${component}_INCLUDE_DIRS} PARENT_SCOPE)
# Add the per-component include directories to the full include dirs.
list(APPEND ImageMagick_INCLUDE_DIRS ${ImageMagick_${component}_INCLUDE_DIRS})
list(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS) list(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE) set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)