project(ITK-ItkVtkGlue)
set(ITK-ItkVtkGlue_LIBRARIES ITK-ItkVtkGlue)

#
# Add the third party includes and libraries
#
set(ITK-ItkVtkGlue_SYSTEM_INCLUDE_DIRS ${VTK_INCLUDE_DIRS})
set(ITK-ItkVtkGlue_SYSTEM_LIBRARY_DIRS ${VTK_LIBRARY_DIRS})

itk_module_impl()

project(ITK-ItkVtkGlue)
set(ITK-ItkVtkGlue_LIBRARIES ITK-ItkVtkGlue)

#
# Add the third party includes and libraries
#
# VTK
# The VTK DICOMParser and vtkmetaio includes conflict with the ITK
# versions. Here we remove them from the include directories.
#
string(REGEX REPLACE "[^;]*vtkmetaio;"
         "" VTK_INCLUDE_DIRS "${VTK_INCLUDE_DIRS}")
string(REGEX REPLACE "[^;]*DICOMParser;"
         "" VTK_INCLUDE_DIRS "${VTK_INCLUDE_DIRS}")

set(ITK-ItkVtkGlue_SYSTEM_INCLUDE_DIRS ${VTK_INCLUDE_DIRS})
set(ITK-ItkVtkGlue_SYSTEM_LIBRARY_DIRS ${VTK_LIBRARY_DIRS})

itk_module_impl()

Remove conflicting VTK include directories
COMP: Remove conflicting VTK include directories

If ItkVtkGlue is enabled, applications that use both ITK and VTK may
not compile because of conflicting include files. Both metaio and
DICOMParser exist in VTK and ITK. Applications, for example ITKApps,
that use metaio or DICOMParser may use the VTK include's rather than
the ITK include's. This is not a problem within ITK itself, because
the VTK_INCLUDE_DIRS is only set within the ItkVtkGlue module.

Change-Id: Ic54f1006791f9fd98435de1dbe515819084f6199
