# Adding configurable paraview resource\_dir

**URL:** https://discourse.paraview.org/t/adding-configurable-paraview-resource-dir/17018
**Category:** Development
**Created:** [July 29, 2025, 6:04am UTC](https://discourse.paraview.org/t/adding-configurable-paraview-resource-dir/17018 "2025-07-29T06:04:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![qbisi](https://discourse.paraview.org/user_avatar/discourse.paraview.org/qbisi/32/16606_2.png) [@qbisi](https://discourse.paraview.org/u/qbisi)
#### Post date: [July 29, 2025, 6:04am UTC](https://discourse.paraview.org/t/adding-configurable-paraview-resource-dir/17018/1 "2025-07-29T06:04:46Z")

</div>

I am building ParaView with an external VTK. Everything looks fine, except that ParaView cannot find the documentation or examples.

I investigated a bit into the function:

```auto
std::string vtkPVFileInformation::GetParaViewSharedResourcesDirectory()
{
  // Look for where the function "GetVTKVersion." lives.
  auto vtk_libs = vtkGetLibraryPathForSymbol(GetVTKVersion);

  // Where docs might be in relation to the executable
  std::vector<std::string> prefixes = {
#if defined(_WIN32) || defined( __APPLE__ )
    ".."
#else
    "share/paraview-" PARAVIEW_VERSION
#endif
  };

  // Search for the docs directory
  vtkNew<vtkResourceFileLocator> locator;
  auto resource_dir = locator->Locate(vtk_libs, prefixes, "doc");
  if (!resource_dir.empty())
  {
    resource_dir = vtksys::SystemTools::CollapseFullPath(resource_dir);
  }

  return resource_dir;
}

```

When building ParaView with an external VTK, we cannot infer `resource_dir` from the path of VTK’s libraries, since those come from a different installation. As a potential fix, could we instead infer `resource_dir` from ParaView’s own libraries or main executable?

Also, I would suggest making `prefixes` configurable via a CMake option. For example, we might want to set `prefixes = "share/paraview"` when `PARAVIEW_VERSIONED_INSTALL` is `OFF`.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [July 29, 2025, 6:01pm UTC](https://discourse.paraview.org/t/adding-configurable-paraview-resource-dir/17018/2 "2025-07-29T18:01:51Z")

</div>

These are good points. Can you please file an issue about it? We can split subtasks off from there.

Cc: @cory.quammen @danlipsa

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 4, 2025, 2:40pm UTC](https://discourse.paraview.org/t/adding-configurable-paraview-resource-dir/17018/3 "2025-08-04T14:40:31Z")

</div>

[https://gitlab.kitware.com/paraview/paraview/-/issues/23043](https://gitlab.kitware.com/paraview/paraview/-/issues/23043)
