| 1 |
# Forward include directories to CastXML |
| 2 |
if(NOT |
| 3 |
VTK_RENDERING_BACKEND |
| 4 |
STREQUAL |
| 5 |
"None") |
| 6 |
foreach(_vtk_lib IN LISTS ITKVtkGlue_VTK_LIBRARIES) |
| 7 |
get_target_property(_vtk_lib_include_dirs ${_vtk_lib} INTERFACE_INCLUDE_DIRECTORIES) |
| 8 |
if(_vtk_lib_include_dirs) |
| 9 |
include_directories(${_vtk_lib_include_dirs}) |
| 10 |
endif() |
| 11 |
endforeach() |
| 12 |
endif() |
| 13 |
|
| 14 |
# Python provides native conversion between ITK and VTK |
| 15 |
if(ITK_WRAP_PYTHON) |
| 16 |
message( |
| 17 |
STATUS |
| 18 |
"ITK_WRAP_PYTHON is turned on - skipping ITKVtkGlue, since native version is available https://docs.itk.org/en/latest/learn/python_quick_start.html#itk-and-vtk." |
| 19 |
) |
| 20 |
else() |
| 21 |
itk_wrap_module(ITKVtkGlue) |
| 22 |
if("${VTK_VERSION}" VERSION_LESS 7.0.0) |
| 23 |
message(WARNING "The ITKVtkGlue module can only built with Python 3 and VTK >= 7.\n" |
| 24 |
"Only the c++ version of the module will be built.") |
| 25 |
else() |
| 26 |
list(APPEND WRAPPER_SWIG_LIBRARY_FILES "${CMAKE_CURRENT_SOURCE_DIR}/VtkGlue.i") |
| 27 |
set(WRAPPER_LIBRARY_DEPENDS ITKCommon ITKVTK) |
| 28 |
|
| 29 |
set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES}) |
| 30 |
|
| 31 |
itk_auto_load_and_end_wrap_submodules() |
| 32 |
endif() |
| 33 |
endif() |