Commit a027ae55 authored by T.J. Corona's avatar T.J. Corona

Add VTK option to the superbuild

parent baeb2fe9
Pipeline #60978 passed with stage
......@@ -18,6 +18,8 @@ macro (superbuild_setup_variables)
set(cmb_version "${cmb_version_major}.${cmb_version_minor}")
superbuild_set_version_variables(paraview "5.4.0-RC2" "paraview-version.cmake")
set(paraview_version "${paraview_version_major}.${paraview_version_minor}")
superbuild_set_version_variables(vtk "8.1.0" "vtk-version.cmake")
set(vtk_version "${vtk_version_major}.${vtk_version_minor}")
endmacro ()
function (superbuild_find_projects var)
......@@ -62,6 +64,7 @@ function (superbuild_find_projects var)
smtk
smtkusersguide
szip
vtk
vxl
zeromq
zlib)
......@@ -92,6 +95,10 @@ function (superbuild_find_projects var)
endfunction ()
function (superbuild_sanity_check)
if (vtk_enabled AND paraview_enabled)
message(FATAL_ERROR
"Only one of the following projects should be enabled: vtk, paraview.")
endif ()
if (NOT smtk_enabled AND NOT cmb_enabled)
message(FATAL_ERROR
"At least one of the following projects must be enabled: cmb, smtk.")
......
......@@ -18,26 +18,31 @@ if (shiboken_enabled OR pybind11_enabled)
set(smtk_enable_python_wrapping ON)
endif ()
set(smtk_enable_vtk OFF)
if (vtk_enabled OR paraview_enabled)
set(smtk_enable_vtk ON)
endif ()
#explicitly depend on gdal so we inherit the location of the GDAL library
#which FindGDAL.cmake fails to find, even when given GDAL_DIR.
superbuild_add_project(smtk
DEVELOPER_MODE
DEBUGGABLE
DEPENDS boost cxx11 gdal hdf5 paraview python qt remus zeromq
DEPENDS_OPTIONAL cgm cumulus moab netcdf opencv pybind11 shiboken
qt4 qt5
DEPENDS boost cxx11 hdf5 netcdf
DEPENDS_OPTIONAL cgm cumulus gdal moab netcdf opencv paraview pybind11 python
remus shiboken qt qt4 qt5 vtk
CMAKE_ARGS
${smtk_extra_cmake_args}
-DBUILD_SHARED_LIBS:BOOL=ON
-DSMTK_ENABLE_OPENCV:BOOL=${opencv_enabled}
-DSMTK_ENABLE_QT_SUPPORT:BOOL=ON
-DSMTK_ENABLE_VTK_SUPPORT:BOOL=ON
-DSMTK_ENABLE_PARAVIEW_SUPPORT:BOOL=ON
-DSMTK_ENABLE_QT_SUPPORT:BOOL=${qt_enabled}
-DSMTK_ENABLE_VTK_SUPPORT:BOOL=${smtk_enable_vtk}
-DSMTK_ENABLE_PARAVIEW_SUPPORT:BOOL=${paraview_enabled}
-DSMTK_ENABLE_CGM_SESSION:BOOL=${cgm_enabled}
-DSMTK_ENABLE_DISCRETE_SESSION:BOOL=ON
-DSMTK_ENABLE_EXODUS_SESSION:BOOL=ON
-DSMTK_ENABLE_REMOTE_SESSION:BOOL=ON
-DSMTK_ENABLE_REMUS_SUPPORT:BOOL=ON
-DSMTK_ENABLE_DISCRETE_SESSION:BOOL=${smtk_enable_vtk}
-DSMTK_ENABLE_EXODUS_SESSION:BOOL=${paraview_enabled}
-DSMTK_ENABLE_REMOTE_SESSION:BOOL=${remus_enabled}
-DSMTK_ENABLE_REMUS_SUPPORT:BOOL=${remus_enabled}
-DSMTK_ENABLE_PYTHON_WRAPPING:BOOL=${smtk_enable_python_wrapping}
-DSMTK_USE_PYBIND11:BOOL=${pybind11_enabled}
-DSMTK_QT_VERSION:STRING=${qt_version}
......
set(vtk_extra_cmake_args)
if (UNIX AND NOT APPLE)
list (APPEND vtk_extra_cmake_args
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE)
endif ()
superbuild_add_project(vtk
DEBUGGABLE
DEPENDS
gdal
png
zlib
netcdf
DEPENDS_OPTIONAL
cxx11 freetype python qt qt4 qt5
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
-DVTK_WRAP_PYTHON:BOOL=${python_enabled}
-DVTK_USE_MPI:BOOL=${mpi_enabled}
-DVTK_USE_SYSTEM_HDF5:BOOL=${hdf5_enabled}
-DHDF5_NO_FIND_PACKAGE_CONFIG_FILE:BOOL=ON
-DVTK_USE_SYSTEM_NETCDF:BOOL=${netcdf_enabled}
-DVTK_RENDERING_BACKEND:STRING=OpenGL2
-DVTK_QT_VERSION:STRING=${qt_version}
#CMB needs geovis enabled to provide the gdal reader
-DModule_vtkGeovisCore:BOOL=ON
-DModule_vtkIOGDAL:BOOL=ON
-DModule_vtkViewsInfovis:BOOL=ON
-DModule_vtkRenderingMatplotlib:BOOL=ON
-DModule_vtkRenderingGL2PSOpenGL2:BOOL=ON
-DModule_vtkTestingRendering:BOOL=ON
-DModule_vtkGUISupportQt:BOOL=${qt_enabled}
-DModule_vtkRenderingQt:BOOL=${qt_enabled}
-DGDAL_DIR:PATH=<INSTALL_DIR>
-DModule_vtkIOParallelExodus:BOOL=ON
# since VTK mangles all the following, I wonder if there's any point in
# making it use system versions.
-DVTK_USE_SYSTEM_FREETYPE:BOOL=${freetype_enabled}
# currently png strips rpaths don't use this in cmb, so don't use this
# -DVTK_USE_SYSTEM_PNG:BOOL=${png_enabled}
-DVTK_USE_SYSTEM_ZLIB:BOOL=${zlib_enabled}
-DCMAKE_INSTALL_NAME_DIR:STRING=<INSTALL_DIR>/lib
${vtk_extra_cmake_args})
superbuild_add_extra_cmake_args(
-DVTK_DIR:PATH=<INSTALL_DIR>/lib/cmake/vtk-${vtk_version})
......@@ -14,6 +14,10 @@ superbuild_set_revision(paraview
GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"
GIT_TAG "${paraview_revision}")
superbuild_set_revision(vtk
GIT_REPOSITORY "https://gitlab.kitware.com/vtk/vtk.git"
GIT_TAG origin/master)
superbuild_set_revision(shiboken
# https://github.com/OpenGeoscience/shiboken.git
URL "http://www.paraview.org/files/dependencies/shiboken-110e45fa9d873afea4d7ae47da3fb678b1831a21.tar.bz2"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment