Skip to content

VTK: support unversioned include directories#2

Open
lbatuska wants to merge 1 commit into
OpenFOAM:masterfrom
lbatuska:VTK_INCLUDE_DIR_fix
Open

VTK: support unversioned include directories#2
lbatuska wants to merge 1 commit into
OpenFOAM:masterfrom
lbatuska:VTK_INCLUDE_DIR_fix

Conversation

@lbatuska

Copy link
Copy Markdown

Support unversioned system VTK include directories

Summary

Improve the detection of VTK_INCLUDE_DIR for system ParaView installations by supporting distributions that install VTK headers under the unversioned include/vtk directory.

Problem

When the VTK headers are not available directly under ParaView_INCLUDE_DIR, etc/config.sh/paraview currently derives the include directory from the resolved libvtkCommonCore library name:

export VTK_INCLUDE_DIR=$ParaView_DIR/include/vtk-${libvtkCommonCore#*.so.}

On Arch Linux, the resolved library name ends in .so.1. This causes the configuration to select:

/usr/include/vtk-1

However, Arch Linux installs the VTK headers under:

/usr/include/vtk

As a result, building the ParaView readers fails with:

fatal error: vtkMultiBlockDataSetAlgorithm.h: No such file or directory

VTK header-directory layouts vary between distributions:

This means that assuming only a versioned vtk-* include directory is not portable across supported Linux distributions.

Change

Before using the existing version-derived include path, check whether the VTK headers are installed under:

$ParaView_DIR/include/vtk

When the required header is present there, set:

VTK_INCLUDE_DIR="$ParaView_DIR/include/vtk"

Otherwise, retain the existing version-derived path as a fallback.

This is a minimal change that adds support for unversioned VTK header directories without changing the existing behaviour on distributions using versioned directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant