paraview.cmake 4.74 KB
Newer Older
1
set (extra_cmake_args)
2
if (manta_ENABLED)
3
  list (APPEND extra_cmake_args
4
    -DMANTA_BUILD:PATH=${SuperBuild_BINARY_DIR}/manta/src/manta-build)
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
5
endif()
6 7 8 9
if(PV_NIGHTLY_SUFFIX)
  list (APPEND extra_cmake_args
    -DPV_NIGHTLY_SUFFIX:STRING=${PV_NIGHTLY_SUFFIX})
endif()
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
10

11 12 13 14 15 16 17 18 19 20 21 22 23
if (USE_OPENGL2_RENDERING)
  list(APPEND extra_cmake_args -DVTK_RENDERING_BACKEND:STRING=OpenGL2)
    set(_disable_plugins
      SciberQuestToolKit
      PointSprite
      NonOrthogonalSource
      PacMan
      StreamingParticles
      SierraPlotTools
      SLACTools
      UncertaintyRendering
      SurfaceLIC
      EyeDomeLighting
24 25
      RGBZView
      MobileRemoteControl
26 27 28 29 30 31 32 33
    )
    foreach(plugin ${_disable_plugins})
      list(APPEND extra_cmake_args -DPARAVIEW_BUILD_PLUGIN_${plugin}:BOOL=FALSE)
    endforeach()
    # Force off as visit bridge currently hard depends on OpenGL
    set(visitbridge_ENABLED FALSE)
endif()

Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
34 35 36
if (APPLE)
  # We are having issues building mpi4py with Python 2.6 on Mac OSX. Hence,
  # disable it for now.
37 38 39
  # We set the VTK_REQUIRED_OBJCXX_FLAGS to nothing to work around the
  # fact that the current version of vtk tries to enable objc garbage collection
  # which has been removed in XCode 5
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
40
  list (APPEND extra_cmake_args
41
        -DPARAVIEW_USE_SYSTEM_MPI4PY:BOOL=ON
42
        -DUSE_COMPILER_HIDDEN_VISIBILITY:BOOL=OFF
43
        -DVTK_REQUIRED_OBJCXX_FLAGS:STRING=)
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
44 45
endif()

46 47 48 49
if (UNIX AND NOT APPLE)
  list (APPEND extra_cmake_args -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE)
endif()

50
set (PARAVIEW_INSTALL_DEVELOPMENT_FILES FALSE)
51
if (paraviewsdk_ENABLED OR __BUILDBOT_INSTALL_LOCATION)
52
  set (PARAVIEW_INSTALL_DEVELOPMENT_FILES TRUE)
53 54
  list(APPEND extra_cmake_args
    -DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON)
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
55 56
endif()

57 58 59 60 61
if (__BUILDBOT_INSTALL_LOCATION)
  list(APPEND extra_cmake_args
    -DPARAVIEW_CUSTOM_INSTALL_NAME_DIR:STRING=<INSTALL_DIR>)
endif ()

62 63
#this can't be quoted, since that will introduce an extra
#set of quotes into pqparaviewInitializer, and break the build
Bob Obara's avatar
Bob Obara committed
64
set(optional_plugins CMB_Plugin+KMLExporter_Plugin)
65

66
add_external_project(paraview
67
  DEPENDS
68
    boost
David Thompson's avatar
David Thompson committed
69
    gdal
70
    png
71
    python
72
    qt
73 74
    # Doesn't work for OpenGL2 yet
    # visitbridge
75
    zlib
76 77
    netcdf
    netcdfcpp
78
    ${paraview_depends}
79
  DEPENDS_OPTIONAL
80
    freetype ffmpeg hdf5 libxml3 manta mpi silo cgns mesa osmesa
81 82 83 84
  CMAKE_ARGS
    -DBUILD_SHARED_LIBS:BOOL=ON
    -DBUILD_TESTING:BOOL=OFF
    -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON
85 86
    # Disabled as new CMB doesn't use it, and it is not available in GL2.
    # -DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=ON
87
    -DPARAVIEW_BUILD_PLUGIN_MantaView:BOOL=${manta_ENABLED}
88
    -DPARAVIEW_BUILD_QT_GUI:BOOL=${qt_ENABLED}
89
    -DPARAVIEW_ENABLE_FFMPEG:BOOL=${ffmpeg_ENABLED}
90
    -DPARAVIEW_ENABLE_PYTHON:BOOL=${python_ENABLED}
91
    -DPARAVIEW_ENABLE_WEB:BOOL=OFF
92
    -DPARAVIEW_USE_MPI:BOOL=${mpi_ENABLED}
93
    # Doesn't work with OpenGL2 yet, disable for now in that case.
94
    -DPARAVIEW_USE_VISITBRIDGE:BOOL=${visitbridge_ENABLED}
95
    -DVTK_USE_SYSTEM_HDF5:BOOL=${hdf5_ENABLED}
96
    -DVTK_USE_SYSTEM_NETCDF:BOOL=${netcdf_ENABLED}
97

98 99 100 101 102
    #Disable the SciberQuestPlugin support for cuda. If we are building on
    #a machine with cuda installed, but needs to manually set the proper
    #backend compiler (aka every linux and mac machine) this fails
    -DSQTK_CUDA:BOOL=OFF

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

106 107
    #CMB needs geovis enabled to provide the kml and gdal readers
    -DModule_vtkGeovisCore:BOOL=ON
David Thompson's avatar
David Thompson committed
108
    -DModule_vtkIOGDAL:BOOL=ON
109
    -DModule_vtkViewsInfovis:BOOL=ON
David Thompson's avatar
David Thompson committed
110 111
    -DGDAL_DIR:PATH=<INSTALL_DIR>

112 113 114
    #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
115
    -DBPC_OPTIONAL_PLUGINS:INTERNAL=${optional_plugins}
116
    -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=${PARAVIEW_INSTALL_DEVELOPMENT_FILES}
117 118
    # since VTK mangles all the following, I wonder if there's any point in
    # making it use system versions.
119 120
    -DVTK_USE_SYSTEM_FREETYPE:BOOL=${freetype_ENABLED}
#    -DVTK_USE_SYSTEM_LIBXML2:BOOL=${libxml2_ENABLED}
121 122
#    currently png strips rpaths don't use this in cmb, so don't use this
#    -DVTK_USE_SYSTEM_PNG:BOOL=${png_ENABLED}
123
    -DVTK_USE_SYSTEM_ZLIB:BOOL=${zlib_ENABLED}
124

125 126
    # Web documentation
    -DPARAVIEW_BUILD_WEB_DOCUMENTATION:BOOL=${PARAVIEW_BUILD_WEB_DOCUMENTATION}
127

128 129 130 131
    # specify the apple app install prefix. No harm in specifying it for all
    # platforms.
    -DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications

132 133 134 135
    #If this is true paraview doesn't properly clean the paths to system
    #libraries like netcdf
    -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=TRUE

136
    ${extra_cmake_args}
137
  LIST_SEPARATOR @
138
)