Install only public headers, not build2 metafiles - #47
Merged
Conversation
CMake's install(DIRECTORY include/) and Meson's install_subdir both copied the include tree wholesale, dropping the build2 buildfile metafiles (include/buildfile, include/geo/buildfile) into the consumer's system include path. The build2 build itself never installs them -- only these two rules did. Restrict the CMake rule to FILES_MATCHING PATTERN "*.hpp" and add exclude_files: ['buildfile'] to the Meson install_subdir. Both now install exactly the eight public headers (detail/ preserved) and nothing else. The build2 metafiles stay in the repo untouched; header-only, no version change.
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.
What
cmake --installandmeson installwere leaking the build2buildfilemetafiles into the consumer's system include path.CMakeLists.txt—install(DIRECTORY include/ ...)copied the tree wholesale, dropping bothinclude/buildfileandinclude/geo/buildfileunder<prefix>/include/.meson.build—install_subdir('include/geo', ...)did the same forinclude/geo/buildfile.The build2 build itself never installs these (its
hxx{*}: install = include/geo/rule only ships headers) — only the CMake and Meson rules did.Fix
FILES_MATCHING PATTERN "*.hpp".exclude_files: ['buildfile']toinstall_subdir.The build2 metafiles stay in the repo untouched — they're required source for the cppget.org package. Header-only change, no version bump, no release.
Verification
Installed both to a throwaway prefix; each now ships exactly the eight public headers and nothing else:
find <prefix> -name buildfile→ empty for both CMake and Meson. Does not affect the WrapDB consumption path, which pulls headers via the include dir and never runsmeson install.