Uh oh!
There was an error while loading. Please reload this page.
Honor CMAKE_INSTALL_INCLUDEDIR in exported header paths - #258
Open
Alb3e3 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 freeto 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.
Fixes#206.
The install rules honor
CMAKE_INSTALL_INCLUDEDIR, but the exported target stillpoints its public header sources and include directory at
<prefix>/include.An external CMake consumer therefore fails to configure when headers are
installed in a separate prefix or a custom relative directory.
Use
CMAKE_INSTALL_INCLUDEDIRfor those exported paths and load GNUInstallDirsbefore constructing the target. This preserves the default layout and relative
path relocation without dropping the public header sources.
Verified the original failure with an installed-package consumer. After the
change, that consumer builds and roundtrips data with default, custom relative,
absolute split-prefix, relocated default, and shared-library split-prefix
installations. All 25 unit tests and a shortened run of all benchmarks pass
with GCC 15.2 and CMake 3.31.6 on Linux.
AI assistance was used to prepare this patch and run local validation.