paraview.cmake 4.61 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
#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
59
set(optional_plugins CMB_Plugin+KMLExporter_Plugin)
60

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

93 94 95 96 97
    #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

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

101 102
    #CMB needs geovis enabled to provide the kml and gdal readers
    -DModule_vtkGeovisCore:BOOL=ON
David Thompson's avatar
David Thompson committed
103
    -DModule_vtkIOGDAL:BOOL=ON
104
    -DModule_vtkViewsInfovis:BOOL=ON
David Thompson's avatar
David Thompson committed
105 106
    -DGDAL_DIR:PATH=<INSTALL_DIR>

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

120 121
    # Web documentation
    -DPARAVIEW_BUILD_WEB_DOCUMENTATION:BOOL=${PARAVIEW_BUILD_WEB_DOCUMENTATION}
122

123 124 125 126
    # specify the apple app install prefix. No harm in specifying it for all
    # platforms.
    -DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications

127 128 129 130
    #If this is true paraview doesn't properly clean the paths to system
    #libraries like netcdf
    -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=TRUE

131
    ${extra_cmake_args}
132
  LIST_SEPARATOR @
133
)