Skip to content

Generate build artifacts to binary dir instead of source tree#1164

Open
julianoes wants to merge 1 commit intoeclipse-zenoh:mainfrom
julianoes:fix/out-of-tree-build-artifacts
Open

Generate build artifacts to binary dir instead of source tree#1164
julianoes wants to merge 1 commit intoeclipse-zenoh:mainfrom
julianoes:fix/out-of-tree-build-artifacts

Conversation

@julianoes
Copy link

@julianoes julianoes commented Feb 22, 2026

Description

configure_file() calls were writing zenoh-pico.h, config.h, library.json, and zenohpico.pc directly into the source tree, causing dirty working directories when zenoh-pico is used as a submodule.

What does this PR do?

Generate these files to CMAKE_CURRENT_BINARY_DIR instead and add it to the include path so the generated headers are found. Remove the generated files from the repository since they should no longer be needed in-tree.

Update install rules to reference the new locations.

This also removes the library.json file in the source. As this file is not installed, it's not 100% clear to me where this is used/needed.

Why is this change needed?

This prevents the submodule being marked dirty when used in PX4.

Related Issues

Alternative to #1137.


🏷️ Label-Based Checklist

No specific label requirements detected.

Current labels: No labels

Add one of these labels to this PR to see relevant checklist items: api-sync, breaking-change, bug, ci, dependencies, documentation, enhancement, new feature, internal

This section updates automatically when labels change.

configure_file() calls were writing zenoh-pico.h, config.h,
library.json, and zenohpico.pc directly into the source tree, causing
dirty working directories when zenoh-pico is used as a submodule.

Generate these files to CMAKE_CURRENT_BINARY_DIR instead and add it
to the include path so the generated headers are found. Remove the
generated files from the repository since they should no longer be
needed in-tree.

Update install rules to reference the new locations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@julianoes julianoes force-pushed the fix/out-of-tree-build-artifacts branch from 7ac1544 to e1fac34 Compare February 22, 2026 16:52
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