Repository navigation
Stage bundles and tools in the binary tree, never the source tree - #28
Merged
Merged
Conversation
Phase 6 of the CMake cleanup, which the ost 0.23.6 pin made possible.
execMotion's library and generated plugInfo.json, and the three CLIs, were
built into plugins/execMotion/lib/, its plugin/resources/ and tools/*/bin/,
because ost 0.23.4 packaged them from the source tree. Now:
* cmake/UsdMotionStage.cmake stages each member in its binary directory,
laid out as the member is: a tool's bin/, a bundle's lib/ beside its
plugin/resources/<name>/plugInfo.json. A multi-config generator gets
one stage per configuration, so Debug and Release no longer overwrite
each other. The build's tests run against that stage.
* execMotion has install rules -- lib/ beside the registration at the
path its manifest's usd.plug_info names -- which `ost plugin build`
installs into the bundle's target-local stage, and `ost plugin test`
and `ost plugin package` read. The package loses plugInfo.json.in,
which only the source-tree layout ever swept in.
* `ost build` takes each tool from its member's bin/ in the root build
tree, which is the stage under the Ninja generator ost configures.
* motion_convert's build stages the profiles in <stage>/share/, so a
converter run from the build tree finds them with no flags, by the rule
that finds them in an installed prefix.
The .gitignore lines that hid those outputs are gone, so an output that
lands in the source tree again shows in `git status`. buildInfo.json goes
with them: nothing here or in ost writes one.
Verified on Windows with ost 0.23.6, after deleting the old source-tree
outputs: ost build + ost test (53/53, with the ost tool stages filled from
the build tree); ost plugin build/test/package execMotion from its
bundle stage, and its package-origin test; ost plugin package --workspace
(one bundle, three tools); plain CMake with the Visual Studio generator
(53/53, per-config stages); the three tools and execMotion built and tested
standalone against an installed prefix; motion_convert converting with no
profile flags from both build trees. `git status` stayed clean throughout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Phase 6 of the CMake cleanup, the one #27 left out.
ost0.23.6 is now pinned, and it packages a bundle and a tool from a per-target stage, so a build no longer has to write into the checkout.Until now,
execMotion's library and generatedplugInfo.json, and the three CLIs, were built intoplugins/execMotion/lib/,plugins/execMotion/plugin/resources/execMotion/andtools/*/bin/, becauseost0.23.4 packaged them from there. After this PR:cmake/UsdMotionStage.cmakeputs each member's build output in its binary directory, in the same layout as the member itself: a tool'sbin/, and a bundle'slib/next toplugin/resources/<name>/plugInfo.json. Multi-config generators get one stage per configuration (<binary>/<config>/), so Debug and Release no longer overwrite each other. The build's own tests run against this stage.execMotionhas install rules. They putlib/next to the registration, at the pathusd.plug_infonames, soplugInfo.json's relativeLibraryPathresolves in any prefix.ost plugin buildinstalls the bundle into its per-target stage, andost plugin testandost plugin packageread it from there. The package drops from 67 to 66 files: the one removed isplugInfo.json.in, which only the old source-tree layout picked up.ost buildtakes each executable from the member'sbin/in the root build tree. With the Ninja generatorostuses, that directory is the stage. The warningost buildused to print ("the successful root build produced no matching file") is gone.motion_convert's build copies the profiles into<stage>/share/usd-motion-plugins/profiles/motion. A converter run from the build tree therefore still finds them with no flags, through the same rule it uses in an installed prefix (<exe>/../share/...). The C++ changes only in comments..gitignoreno longer hideslib/,bin/andplugInfo.jsonunderplugins/andtools/. If a build output lands in the source tree again,git statuswill show it.buildInfo.jsonis removed from the ignore list too: nothing in this repo or inostwrites one.A checkout built before this change still has the old outputs. It can delete
plugins/execMotion/lib/,plugins/execMotion/plugin/resources/execMotion/plugInfo.jsonandtools/*/bin/. The CHANGELOG says the same.Type of change
Validation
Windows,
ost0.23.6 (the pinned CLI). The old source-tree outputs were deleted first, andgit statusshowed nothing new at every step:ost build+ost test: 53/53. Compared withmain, the ctest definitions differ only in paths: source-treelib//bin/became the binary-tree stage.ostfilled all three tool stages from the build tree.ost plugin build plugins/execMotion, which now reportsbundle-stage/libandbundle-stage/plugin/...; thenost plugin test(OK),ost plugin package(matched (ost-managed)), andost plugin test --from-package(OK).ost plugin package --workspace: one bundle and three tools.<member>/Release/.cmake --installputslib/libExecMotion.dllandplugin/resources/execMotion/plugInfo.jsoninto the prefix. The three tools andexecMotionwere then built and tested standalone against that prefix: all pass.motion_convertwas run with no--profile-dirand noUSDMOTION_PROFILE_PATHfrom both build trees, and converted the recorded export successfully each time.check_docs.py. Regenerating the CI workflow produces no content change.Linux and macOS are this PR's CI.
Checklist
🤖 Generated with Claude Code