|
1 | 1 | # Forward include directories to CastXML |
2 | | -if(NOT VTK_RENDERING_BACKEND STREQUAL "None") |
3 | | - foreach(_vtk_lib IN LISTS ITKVtkGlue_VTK_LIBRARIES) |
4 | | - get_target_property( |
5 | | - _vtk_lib_include_dirs |
6 | | - ${_vtk_lib} |
7 | | - INTERFACE_INCLUDE_DIRECTORIES |
8 | | - ) |
9 | | - if(_vtk_lib_include_dirs) |
10 | | - include_directories(${_vtk_lib_include_dirs}) |
11 | | - endif() |
12 | | - endforeach() |
13 | | -endif() |
| 2 | +foreach(_vtk_lib IN LISTS ITKVtkGlue_VTK_LIBRARIES) |
| 3 | + get_target_property( |
| 4 | + _vtk_lib_include_dirs |
| 5 | + ${_vtk_lib} |
| 6 | + INTERFACE_INCLUDE_DIRECTORIES |
| 7 | + ) |
| 8 | + if(_vtk_lib_include_dirs) |
| 9 | + include_directories(${_vtk_lib_include_dirs}) |
| 10 | + endif() |
| 11 | +endforeach() |
14 | 12 |
|
15 | | -# Python provides native conversion between ITK and VTK |
16 | | -if(ITK_WRAP_PYTHON) |
| 13 | +itk_wrap_module(ITKVtkGlue) |
| 14 | +if("${VTK_VERSION}" VERSION_LESS 7.0.0) |
17 | 15 | message( |
18 | | - STATUS |
19 | | - "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." |
| 16 | + WARNING |
| 17 | + "The ITKVtkGlue module can only built with Python 3 and VTK >= 7." |
20 | 18 | ) |
21 | 19 | else() |
22 | | - itk_wrap_module(ITKVtkGlue) |
23 | | - if("${VTK_VERSION}" VERSION_LESS 7.0.0) |
24 | | - message( |
25 | | - WARNING |
26 | | - "The ITKVtkGlue module can only built with Python 3 and VTK >= 7.\n" |
27 | | - "Only the c++ version of the module will be built." |
28 | | - ) |
29 | | - else() |
30 | | - list( |
31 | | - APPEND |
32 | | - WRAPPER_SWIG_LIBRARY_FILES |
33 | | - "${CMAKE_CURRENT_SOURCE_DIR}/VtkGlue.i" |
34 | | - ) |
35 | | - set( |
36 | | - WRAPPER_LIBRARY_DEPENDS |
37 | | - ITKCommon |
38 | | - ITKVTK |
39 | | - ) |
40 | | - |
41 | | - set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES}) |
42 | | - |
43 | | - itk_auto_load_and_end_wrap_submodules() |
44 | | - endif() |
| 20 | + list( |
| 21 | + APPEND |
| 22 | + WRAPPER_SWIG_LIBRARY_FILES |
| 23 | + "${CMAKE_CURRENT_SOURCE_DIR}/VtkGlue.i" |
| 24 | + ) |
| 25 | + set( |
| 26 | + WRAPPER_LIBRARY_DEPENDS |
| 27 | + ITKCommon |
| 28 | + ITKVTK |
| 29 | + ) |
| 30 | + set( |
| 31 | + WRAPPER_LIBRARY_LINK_LIBRARIES |
| 32 | + ${ITK_LIBRARIES} |
| 33 | + ${ITKVtkGlue_VTK_LIBRARIES} |
| 34 | + ) |
| 35 | + itk_auto_load_and_end_wrap_submodules() |
45 | 36 | endif() |
0 commit comments