Skip to content

Commit

Permalink
Merge pull request #400 from wwmayer/vtk_comps
Browse files Browse the repository at this point in the history
search in list of all available vtk components instead of file system
  • Loading branch information
wwmayer committed Dec 28, 2016
2 parents f065f8e + d220121 commit 2df8402
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Expand Up @@ -584,13 +584,14 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
vtkFiltersSources
vtkFiltersGeometry
)

# check which modules are available
if(UNIX AND NOT APPLE)
find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5)
foreach(_module ${VTK_COMPONENTS})
file(GLOB_RECURSE _module_exists /usr/lib*/cmake/*${_module}.cmake
${CMAKE_ROOT}/*${_module}.cmake)
if(_module_exists)
list (FIND VTK_MODULES_ENABLED ${_module} _index)
if (${_index} GREATER -1)
list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
endif()
endforeach()
Expand Down

0 comments on commit 2df8402

Please sign in to comment.