Merge pull request #4916 from waebbl/find-vtk-9-improvements
improve search for VTK-9
This commit is contained in:
@@ -27,13 +27,24 @@ macro(SetupSalomeSMESH)
|
||||
# check which modules are available
|
||||
if(UNIX OR WIN32)
|
||||
find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
|
||||
list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5 vtkFiltersParallelDIY2 vtkRenderingCore vtkInteractionStyle vtkRenderingFreeType vtkRenderingOpenGL2)
|
||||
foreach(_module ${VTK_COMPONENTS})
|
||||
list (FIND VTK_MODULES_ENABLED ${_module} _index)
|
||||
if (${_index} GREATER -1)
|
||||
list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
|
||||
endif()
|
||||
endforeach()
|
||||
if(${VTK_MAJOR_VERSION} LESS 9)
|
||||
list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5 vtkFiltersParallelDIY2 vtkRenderingCore vtkInteractionStyle vtkRenderingFreeType vtkRenderingOpenGL2)
|
||||
foreach(_module ${VTK_COMPONENTS})
|
||||
list (FIND VTK_MODULES_ENABLED ${_module} _index)
|
||||
if(${_index} GREATER -1)
|
||||
list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(VTK_COMPONENTS "CommonCore;CommonDataModel;FiltersVerdict;IOXML;FiltersCore;FiltersGeneral;IOLegacy;FiltersExtraction;FiltersSources;FiltersGeometry")
|
||||
list(APPEND VTK_COMPONENTS "IOMPIParallel;ParallelMPI;hdf5;FiltersParallelDIY2;RenderingCore;InteractionStyle;RenderingFreeType;RenderingOpenGL2")
|
||||
foreach(_module ${VTK_COMPONENTS})
|
||||
list (FIND VTK_AVAILABLE_COMPONENTS ${_module} _index)
|
||||
if(${_index} GREATER -1)
|
||||
list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# don't check VERSION 6 as this would exclude VERSION 7
|
||||
|
||||
Reference in New Issue
Block a user