diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 1c9095d3493..d30e61506e3 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,20 @@ Source: vtk -Version: 8.0.1 +Version: 8.0.1-1 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora, libharu +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, libharu + +Feature: openvr +Description: OpenVR functionality for VTK +Build-Depends: sdl2, openvr + +Feature: qt +Description: Qt functionality for VTK +Build-Depends: qt5 + +Feature: mpi +Description: MPI functionality for VTK +Build-Depends: msmpi + +Feature: python +Description: Python functionality for VTK +Build-Depends: python3 diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 463ce6981f1..0a407e9ae17 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -13,12 +13,32 @@ vcpkg_from_github( # ============================================================================= # Options: These should be set by feature-packages when they become available -set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file -set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file -set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file + +if ("qt" IN_LIST FEATURES) + set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_QT OFF ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file +endif() + +if ("mpi" IN_LIST FEATURES) + set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_MPI OFF ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file +endif() + +if ("python" IN_LIST FEATURES) + set(VTK_WITH_PYTHON ON) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file +endif() +if("openvr" IN_LIST FEATURES) + set(VTK_WITH_OPENVR ON) # IMPORTANT: if ON make sure `OpenVR` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_OPENVR OFF) +endif() + set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file - # ============================================================================= # Apply patches to the source code vcpkg_apply_patches( @@ -78,6 +98,12 @@ if(VTK_WITH_PYTHON) ) endif() +if(VTK_WITH_OPENVR) + list(APPEND ADDITIONAL_OPTIONS + -DModule_vtkRenderingOpenVR=ON + ) +endif() + if(VTK_WITH_ALL_MODULES) list(APPEND ADDITIONAL_OPTIONS -DVTK_BUILD_ALL_MODULES=ON