Skip to content
Snippets Groups Projects
Commit 5c91035f authored by Lars Bilke's avatar Lars Bilke
Browse files

Added CMake-file VtkModules.cmake which defines required vtk modules.

This is the used by ExternalProjectVTK / -Catalyst.cmake
parent efd10ea0
No related branches found
No related tags found
No related merge requests found
......@@ -102,10 +102,11 @@ include(scripts/cmake/packaging/Pack.cmake)
option(Boost_USE_STATIC_LIBS "This option has to be set from the command line (before boost gets found)!" OFF)
include(scripts/cmake/ExternalProjectBoost.cmake)
option(OGS_SYSTEM_VTK_ONLY "If On VTK / ParaView will be searched if installed and will not be build locally." OFF)
include(VtkModules)
if(OGS_INSITU)
include(scripts/cmake/ExternalProjectCatalyst.cmake)
include(ExternalProjectCatalyst)
else()
include(scripts/cmake/ExternalProjectVtk.cmake)
include(ExternalProjectVtk)
endif()
include_directories( SYSTEM ${Boost_INCLUDE_DIRS} )
......
......@@ -7,45 +7,14 @@ if(NOT DEFINED ParaView_DIR AND DEFINED ENV{ParaView_DIR})
set(ParaView_DIR $ENV{ParaView_DIR})
endif()
# CLI modules
set(PARAVIEW_MODULES vtkIOXML)
set(VTK_MODULES vtkIOXML)
if(OGS_USE_MPI)
set(PARAVIEW_MODULES ${PARAVIEW_MODULES} vtkIOParallelXML)
endif()
# GUI modules
if(OGS_BUILD_GUI)
set(PARAVIEW_MODULES ${PARAVIEW_MODULES}
vtkRenderingCore
vtkRenderingOpenGL
vtknetcdf
vtkIOLegacy
vtkIOImage
vtkGUISupportQt
vtkRenderingAnnotation
vtkFiltersExtraction
vtkFiltersGeometry
vtkFiltersTexture
vtkFiltersModeling
vtkFiltersSources
vtkImagingCore
vtkInteractionWidgets
vtkInteractionStyle
vtkIOExport
vtkRenderingFreeType
)
set(CATALYST_GIT_URL https://github.com/ufz/catalyst-gui.git)
endif()
set(VTK_LIBRARIES ${PARAVIEW_MODULES} CACHE STRING "" FORCE)
set(VTK_LIBRARIES ${VTK_MODULES} CACHE STRING "" FORCE)
if(OGS_BUILD_GUI)
# Replace vtknetcdf with vtkNetCDF vtkNetCDF_cxx
list(REMOVE_ITEM VTK_LIBRARIES vtknetcdf)
list(APPEND VTK_LIBRARIES vtkNetCDF vtkNetCDF_cxx)
endif()
find_package(ParaView 4.2 COMPONENTS ${PARAVIEW_MODULES} NO_MODULE QUIET)
find_package(ParaView 4.2 COMPONENTS ${VTK_MODULES} NO_MODULE QUIET)
find_library(VTKIO_LIB_FOUND vtkIOXML-pv4.2 HINTS ${ParaView_DIR}/lib PATH_SUFFIXES Release Debug)
if(ParaView_FOUND AND VTKIO_LIB_FOUND)
......
......@@ -5,35 +5,6 @@ if(NOT DEFINED VTK_DIR AND DEFINED ENV{VTK_DIR})
set(VTK_DIR $ENV{VTK_DIR})
endif()
# CLI modules
set(VTK_MODULES vtkIOXML)
if(OGS_USE_MPI)
set(VTK_MODULES ${VTK_MODULES} vtkIOParallelXML)
endif()
# GUI modules
if(OGS_BUILD_GUI)
set(VTK_MODULES ${VTK_MODULES}
vtkRenderingCore
vtkRenderingOpenGL
vtknetcdf
vtkIOLegacy
vtkIOImage
vtkGUISupportQt
vtkRenderingAnnotation
vtkFiltersExtraction
vtkFiltersGeometry
vtkFiltersTexture
vtkFiltersModeling
vtkFiltersSources
vtkImagingCore
vtkInteractionWidgets
vtkInteractionStyle
vtkIOExport
vtkRenderingFreeType
)
endif()
set(VTK_LIBRARIES ${VTK_MODULES} CACHE STRING "" FORCE)
if(OGS_BUILD_GUI)
# Replace vtknetcdf with vtkNetCDF vtkNetCDF_cxx
......
# CLI modules
set(VTK_MODULES
vtkIOXML
CACHE INTERNAL "Required VTK / ParaView modules"
)
if(OGS_USE_MPI)
set(VTK_MODULES ${VTK_MODULES} vtkIOParallelXML)
endif()
if(OGS_BUILD_GUI)
set(VTK_MODULES ${VTK_MODULES}
vtkRenderingCore
vtkRenderingOpenGL
vtknetcdf
vtkIOLegacy
vtkIOImage
vtkGUISupportQt
vtkRenderingAnnotation
vtkFiltersExtraction
vtkFiltersGeometry
vtkFiltersTexture
vtkFiltersModeling
vtkFiltersSources
vtkImagingCore
vtkInteractionWidgets
vtkInteractionStyle
vtkIOExport
vtkRenderingFreeType
)
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment