From f7717ab26afe60da1d44d9f1972349c26d0ba1ec Mon Sep 17 00:00:00 2001 From: Aleksandr Kovalko Date: Wed, 8 Jul 2026 03:14:37 +0200 Subject: [PATCH] Install only public headers, not build2 metafiles 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. --- CMakeLists.txt | 1 + meson.build | 1 + 2 files changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86cd76d..17364d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,6 +119,7 @@ include(GNUInstallDirs) install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING PATTERN "*.hpp" ) install(TARGETS geo_utils_cpp EXPORT GeoUtilsCppTargets diff --git a/meson.build b/meson.build index 9ceed39..9e36ffd 100644 --- a/meson.build +++ b/meson.build @@ -28,6 +28,7 @@ meson.override_dependency('geo-utils-cpp', geo_utils_cpp_dep) install_subdir( 'include/geo', install_dir: get_option('includedir'), + exclude_files: ['buildfile'], ) # Build the example only when standalone (or explicitly asked), so downstream