# How to install VTK-9.3.1 with ospray support?

**URL:** https://discourse.vtk.org/t/how-to-install-vtk-9-3-1-with-ospray-support/14574
**Category:** Support
**Created:** [September 13, 2024, 11:23am UTC](https://discourse.vtk.org/t/how-to-install-vtk-9-3-1-with-ospray-support/14574 "2024-09-13T11:23:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Akshay\_Tupkar](https://discourse.vtk.org/user_avatar/discourse.vtk.org/akshay_tupkar/32/9259_2.png) [@Akshay\_Tupkar](https://discourse.vtk.org/u/Akshay_Tupkar)
#### Post date: [September 13, 2024, 11:23am UTC](https://discourse.vtk.org/t/how-to-install-vtk-9-3-1-with-ospray-support/14574/1 "2024-09-13T11:23:16Z")

</div>

Hi team, I have installed VTK-9.3.1, but it is throwing an error as  
CMake Warning at CMake/vtkModule.cmake:4787 (find\_package):  
By not providing “Findospray.cmake” in CMAKE\_MODULE\_PATH this project has  
asked CMake to find a package configuration file provided by “ospray”, but  
CMake did not find one.

Could not find a package configuration file provided by “ospray” (requested  
version 2.1) with any of the following names:

```
 osprayConfig.cmake
 ospray-config.cmake

```

Add the installation prefix of “ospray” to CMAKE\_PREFIX\_PATH or set  
“ospray\_DIR” to a directory containing one of the above files. If “ospray”  
provides a separate development package or SDK, be sure it has been  
installed.  
Call Stack (most recent call first):  
Rendering/RayTracing/CMakeLists.txt:59 (vtk\_module\_find\_package)

CMake Error at CMake/vtkModule.cmake:4793 (message):  
Could not find the ospray external dependency.  
Call Stack (most recent call first):  
Rendering/RayTracing/CMakeLists.txt:59 (vtk\_module\_find\_package)  
How can I resolve this error? Any recommendations would be helpful.

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.vtk.org/user_avatar/discourse.vtk.org/danlipsa/32/390_2.png) [@danlipsa](https://discourse.vtk.org/u/danlipsa)
#### Post date: [September 16, 2024, 1:55pm UTC](https://discourse.vtk.org/t/how-to-install-vtk-9-3-1-with-ospray-support/14574/2 "2024-09-16T13:55:31Z")

</div>

ParaView superbuild builds with ospray support so I’ll look there for libraries and versions needed.  
[https://gitlab.kitware.com/paraview/paraview-superbuild](https://gitlab.kitware.com/paraview/paraview-superbuild)

In particular in this file:  
[https://gitlab.kitware.com/paraview/common-superbuild/-/blob/master/versions.cmake](https://gitlab.kitware.com/paraview/common-superbuild/-/blob/master/versions.cmake)

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [September 18, 2024, 1:38am UTC](https://discourse.vtk.org/t/how-to-install-vtk-9-3-1-with-ospray-support/14574/3 "2024-09-18T01:38:27Z")

</div>

First, install OSPRay from [GitHub - RenderKit/ospray: An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization](https://github.com/RenderKit/ospray). Then in the CMake configuration step for VTK, set `ospray_DIR:PATH=<ospray-installation>/lib/cmake/<ospray-version>`. Make sure that the directory you set here is the full path to the directory containing `osprayConfig.cmake` file.
