Skip to content

fix: resolve lbug includes correctly in monorepo builds#13

Merged
adsharma merged 1 commit intomainfrom
monorepo_fix
Apr 28, 2026
Merged

fix: resolve lbug includes correctly in monorepo builds#13
adsharma merged 1 commit intomainfrom
monorepo_fix

Conversation

@adsharma
Copy link
Copy Markdown
Contributor

The standalone precompiled-liblbug support added in fbeac16 changed the imported lbug target to default its include directories from PROJECT_SOURCE_DIR/PROJECT_BINARY_DIR. That works when this repo is configured standalone, but breaks when tools/nodejs_api is built from the Ladybug monorepo because PROJECT_SOURCE_DIR points at the addon directory rather than the top-level Ladybug tree. In CI this produced a non-existent tools/nodejs_api/src/include path and CMake failed during generate.

Fix the imported-target path resolution to prefer explicit LBUG_SOURCE_DIR/LBUG_BUILD_DIR overrides, then fall back to the embedding monorepo source/build directories, and only then to the standalone sibling layout when those directories actually exist. Also fail with a clear error if no valid Ladybug source or generated include tree can be found.

The standalone precompiled-liblbug support added in fbeac16 changed the imported lbug target to default its include directories from PROJECT_SOURCE_DIR/PROJECT_BINARY_DIR. That works when this repo is configured standalone, but breaks when tools/nodejs_api is built from the Ladybug monorepo because PROJECT_SOURCE_DIR points at the addon directory rather than the top-level Ladybug tree. In CI this produced a non-existent tools/nodejs_api/src/include path and CMake failed during generate.

Fix the imported-target path resolution to prefer explicit LBUG_SOURCE_DIR/LBUG_BUILD_DIR overrides, then fall back to the embedding monorepo source/build directories, and only then to the standalone sibling layout when those directories actually exist. Also fail with a clear error if no valid Ladybug source or generated include tree can be found.
@adsharma adsharma merged commit 85b4841 into main Apr 28, 2026
4 checks passed
@adsharma adsharma deleted the monorepo_fix branch April 28, 2026 23:12
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