VTK: support unversioned include directories#2
Open
lbatuska wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support unversioned system VTK include directories
Summary
Improve the detection of
VTK_INCLUDE_DIRfor system ParaView installations by supporting distributions that install VTK headers under the unversionedinclude/vtkdirectory.Problem
When the VTK headers are not available directly under
ParaView_INCLUDE_DIR,etc/config.sh/paraviewcurrently derives the include directory from the resolvedlibvtkCommonCorelibrary name:On Arch Linux, the resolved library name ends in
.so.1. This causes the configuration to select:However, Arch Linux installs the VTK headers under:
As a result, building the ParaView readers fails with:
VTK header-directory layouts vary between distributions:
/usr/include/vtk-9.1directory:https://packages.ubuntu.com/noble/amd64/libvtk9-dev/filelist
/usr/include/vtkdirectory:https://archlinux.org/packages/extra/x86_64/vtk/files/
/usr/include/vtkdirectory:https://packages.fedoraproject.org/pkgs/vtk/vtk-devel/fedora-44-updates.html
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:
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.