paraview.cmake 4.51 KB
Newer Older
1
set(paraview_extra_cmake_args)
Ben Boeckel's avatar
Ben Boeckel committed
2 3
if (PV_NIGHTLY_SUFFIX)
  list(APPEND paraview_extra_cmake_args
4
    -DPV_NIGHTLY_SUFFIX:STRING=${PV_NIGHTLY_SUFFIX})
Ben Boeckel's avatar
Ben Boeckel committed
5
endif ()
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

set(paraview_disable_plugins
  EyeDomeLighting
  SciberQuestToolKit
  PointSprite
  NonOrthogonalSource
  PacMan
  StreamingParticles
  SierraPlotTools
  UncertaintyRendering
  SurfaceLIC
  EyeDomeLighting
  RGBZView
  MobileRemoteControl)
foreach (plugin IN LISTS paraview_disable_plugins)
  list(APPEND paraview_extra_cmake_args
    -DPARAVIEW_BUILD_PLUGIN_${plugin}:BOOL=FALSE)
endforeach ()

25 26 27 28 29 30 31 32
set(paraview_enable_plugins
  SLACTools
)
foreach (plugin in LISTS paraview_enable_plugins)
  list(APPEND paraview_extra_cmake_args
    -DPARAVIEW_BUILD_PLUGIN_${plugin}:BOOL=TRUE)
endforeach()

33 34
if (APPLE)
  list(APPEND paraview_extra_cmake_args
35 36
    # We are having issues building mpi4py with Python 2.6 on Mac OSX. Hence,
    # disable it for now.
37
    -DPARAVIEW_USE_SYSTEM_MPI4PY:BOOL=ON)
38 39 40 41 42 43 44 45 46
endif ()

if (UNIX AND NOT APPLE)
  list (APPEND paraview_extra_cmake_args
    -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE)
endif ()

if (__BUILDBOT_INSTALL_LOCATION)
  list(APPEND paraview_extra_cmake_args
47 48
    -DPARAVIEW_CUSTOM_INSTALL_NAME_DIR:STRING=<INSTALL_DIR>
    -DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON)
49 50
endif ()

51 52 53
# Add mandatory plugins:
# list(APPEND paraview_extra_cmake_args
#   -DPARAVIEW_EXTRA_EXTERNAL_PLUGINS:STRING=CMB_Plugin)
54

55 56 57 58 59 60 61
# Add optional plugins:
# This can't be quoted, since that will introduce an extra
# set of quotes into pqparaviewInitializer, and break the build.
# If you need to add additional plugins to the list, use
#  ExtraPlugin${_superbuild_list_separator}KMLExporter_Plugin
# instead of spaces/semicolons:
set(paraview_optional_plugins KMLExporter_Plugin)
62 63

superbuild_add_project(paraview
64
  DEBUGGABLE
65 66
  DEPENDS
    boost
Ben Boeckel's avatar
Ben Boeckel committed
67
    freetype
68 69 70
    gdal
    png
    python
71
    qt
72
    qt5
73 74 75
    zlib
    netcdf
  DEPENDS_OPTIONAL
76
    cxx11 hdf5 paraviewweb
77 78 79 80
  CMAKE_ARGS
    -DBUILD_SHARED_LIBS:BOOL=ON
    -DBUILD_TESTING:BOOL=OFF
    -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON
81
    -DPARAVIEW_BUILD_QT_GUI:BOOL=${qt_enabled}
82
    -DPARAVIEW_QT_VERSION:STRING=5
83 84 85 86
    -DPARAVIEW_ENABLE_PYTHON:BOOL=${python_enabled}
    -DPARAVIEW_ENABLE_WEB:BOOL=OFF
    -DPARAVIEW_USE_MPI:BOOL=${mpi_enabled}
    -DVTK_USE_SYSTEM_HDF5:BOOL=${hdf5_enabled}
87
    -DHDF5_NO_FIND_PACKAGE_CONFIG_FILE:BOOL=ON
88 89
    -DVTK_USE_SYSTEM_NETCDF:BOOL=${netcdf_enabled}
    -DVTK_RENDERING_BACKEND:STRING=OpenGL2
90
    -DPARAVIEW_ENABLE_WEB:BOOL=${paraviewweb_enabled}
Ben Boeckel's avatar
Ben Boeckel committed
91
    -DVTK_ENABLE_KITS:BOOL=ON
Ben Boeckel's avatar
Ben Boeckel committed
92
    -DPARAVIEW_USE_ICE_T:BOOL=ON
93 94 95 96

    #currently catalyst is having problems on praxis so lets disable it for now
    -DPARAVIEW_ENABLE_CATALYST:BOOL=OFF

Ben Boeckel's avatar
Ben Boeckel committed
97
    #CMB needs geovis enabled to provide the gdal reader
98 99 100 101 102 103 104
    -DModule_vtkGeovisCore:BOOL=ON
    -DModule_vtkIOGDAL:BOOL=ON
    -DModule_vtkViewsInfovis:BOOL=ON
    -DModule_vtkRenderingMatplotlib:BOOL=ON
    -DModule_vtkRenderingGL2PSOpenGL2:BOOL=ON
    -DGDAL_DIR:PATH=<INSTALL_DIR>

Ben Boeckel's avatar
Ben Boeckel committed
105 106 107
    # CMB needs to specify external plugins so that we can let paraview
    # properly install the plugins. So we sneakily force a variable that is an
    # implementation detail of paraview branding
108 109 110 111 112 113 114 115 116
    -DBPC_OPTIONAL_PLUGINS:INTERNAL=${paraview_optional_plugins}
    -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=TRUE
    # 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}

Ben Boeckel's avatar
Ben Boeckel committed
117
    # Specify the apple app install prefix. No harm in specifying it for all
118 119 120 121 122 123
    # platforms.
    -DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications

    #If this is true paraview doesn't properly clean the paths to system
    #libraries like netcdf
    -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=TRUE
124
    -DCMAKE_MACOSX_RPATH:BOOL=FALSE
125

126 127 128
    # Keep up with the latest ParaView & VTK by avoiding the use of legacy API
    -DVTK_LEGACY_REMOVE:BOOL=TRUE

129
    ${paraview_extra_cmake_args})
130 131 132 133 134 135 136 137 138 139 140

if (__BUILDBOT_INSTALL_LOCATION)
  set(paraview_paraview_dir <INSTALL_DIR>/lib/cmake/paraview-${paraview_version})
  set(paraview_vtk_dir ${paraview_paraview_dir})
else ()
  set(paraview_paraview_dir ${CMAKE_CURRENT_BINARY_DIR}/paraview/build)
  set(paraview_vtk_dir ${paraview_paraview_dir}/VTK)
endif ()

superbuild_add_extra_cmake_args(
  -DParaView_DIR:PATH=${paraview_paraview_dir}
141
  -DParaView_CLEXECUTABLES_DIR:PATH=<INSTALL_DIR>/bin
142
  -DVTK_DIR:PATH=${paraview_vtk_dir})