vtkonly.cmake 2.43 KB
Newer Older
1
2
3
set(vtk_extra_cmake_args)

if (UNIX AND NOT APPLE)
Ben Boeckel's avatar
Ben Boeckel committed
4
  list(APPEND vtk_extra_cmake_args
5
6
7
    -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE)
endif ()

8
set(vtkonly_qt_req NO)
Ben Boeckel's avatar
Ben Boeckel committed
9
if (qt5_enabled)
10
11
12
  set(vtkonly_qt_req YES)
endif ()

T.J. Corona's avatar
T.J. Corona committed
13
14
15
16
17
set(vtkonly_libarchive_req NO)
if (libarchive_enabled)
  set(vtkonly_libarchive_req YES)
endif ()

18
19
20
21
22
set(vtkonly_python_req NO)
if (python_enabled)
  set(vtkonly_python_req YES)
endif ()

23
24
25
26
27
28
29
set(vtk_dll_paths)
if (qt5_dllpath)
  list(APPEND vtk_dll_paths
    "${qt5_dllpath}")
endif ()
string(REPLACE ";" "${_superbuild_list_separator}" vtk_dll_paths "${vtk_dll_paths}")

30
31
32
33
superbuild_add_project(vtkonly
  DEBUGGABLE
  DEPENDS
    gdal
34
    las
35
36
37
38
    png
    zlib
    netcdf
  DEPENDS_OPTIONAL
T.J. Corona's avatar
T.J. Corona committed
39
    cxx11 freetype libarchive python python2 python3 qt5 hdf5
40
41
  CMAKE_ARGS
    -DBUILD_SHARED_LIBS:BOOL=ON
42
    -DVTK_BUILD_TESTING:BOOL=OFF
43
44
    -DVTK_WRAP_PYTHON:BOOL=${python_enabled}
    -DVTK_PYTHON_VERSION:STRING=${python_version}
Ben Boeckel's avatar
Ben Boeckel committed
45
    -DVTK_ENABLE_KITS:BOOL=ON
46

47
48
49
    -DVTK_UNIFIED_INSTALL_TREE:BOOL=ON
    -DVTK_DLL_PATHS:STRING=${vtk_dll_paths}

50
51
    -DVTK_MODULE_ENABLE_VTK_GUISupportQt:STRING=${vtkonly_qt_req}
    # CMB needs geovis enabled to provide the gdal reader
T.J. Corona's avatar
T.J. Corona committed
52
    -DVTK_MODULE_ENABLE_VTK_CommonArchive:STRING=${vtkonly_libarchive_req}
53
54
55
56
57
58
    -DVTK_MODULE_ENABLE_VTK_GeovisCore:STRING=YES
    -DVTK_MODULE_ENABLE_VTK_IOGDAL:STRING=YES
    -DVTK_MODULE_ENABLE_VTK_IOLAS:STRING=YES
    -DVTK_MODULE_ENABLE_VTK_IOParallelExodus:STRING=YES
    -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2:STRING=YES
    -DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2:STRING=YES
59
    -DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib:STRING=${vtkonly_python_req}
60
61
62
    -DVTK_MODULE_ENABLE_VTK_RenderingQt:STRING=${vtkonly_qt_req}
    -DVTK_MODULE_ENABLE_VTK_TestingRendering:STRING=YES
    -DVTK_MODULE_ENABLE_VTK_ViewsInfovis:STRING=YES
63
64
65

    # since VTK mangles all the following, I wonder if there's any point in
    # making it use system versions.
66
67
68
69
70
    -DVTK_MODULE_USE_EXTERNAL_VTK_freetype:BOOL=${freetype_enabled}
    -DVTK_MODULE_USE_EXTERNAL_VTK_hdf5:BOOL=${hdf5_enabled}
    -DVTK_MODULE_USE_EXTERNAL_VTK_netcdf:BOOL=${netcdf_enabled}
    -DVTK_MODULE_USE_EXTERNAL_VTK_png:BOOL=${png_enabled}
    -DVTK_MODULE_USE_EXTERNAL_VTK_zlib:BOOL=${zlib_enabled}
71

72
    -DVTK_GROUP_ENABLE_Web:BOOL=${vtkonly_python_req}
T.J. Corona's avatar
T.J. Corona committed
73

74
75
76
77
78
79
    -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})