Skip to content

Stage bundles and tools in the binary tree, never the source tree - #28

Merged
snkmcb merged 1 commit into
mainfrom
chore/stage-in-binary-tree
Sep 24, 2026
Merged

snkmcb merged 1 commit into
mainfrom
chore/stage-in-binary-tree

Conversation

@snkmcb

@snkmcb snkmcb commented Sep 24, 2026

Copy link
Copy Markdown
Member

Summary

Phase 6 of the CMake cleanup, the one #27 left out. ost 0.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 generated plugInfo.json, and the three CLIs, were built into plugins/execMotion/lib/, plugins/execMotion/plugin/resources/execMotion/ and tools/*/bin/, because ost 0.23.4 packaged them from there. After this PR:

  • cmake/UsdMotionStage.cmake puts each member's build output in its binary directory, in the same layout as the member itself: a tool's bin/, and a bundle's lib/ next to plugin/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.
  • execMotion has install rules. They put lib/ next to the registration, at the path usd.plug_info names, so plugInfo.json's relative LibraryPath resolves in any prefix. ost plugin build installs the bundle into its per-target stage, and ost plugin test and ost plugin package read it from there. The package drops from 67 to 66 files: the one removed is plugInfo.json.in, which only the old source-tree layout picked up.
  • Tools: ost build takes each executable from the member's bin/ in the root build tree. With the Ninja generator ost uses, that directory is the stage. The warning ost build used 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.
  • .gitignore no longer hides lib/, bin/ and plugInfo.json under plugins/ and tools/. If a build output lands in the source tree again, git status will show it. buildInfo.json is removed from the ignore list too: nothing in this repo or in ost writes one.

A checkout built before this change still has the old outputs. It can delete plugins/execMotion/lib/, plugins/execMotion/plugin/resources/execMotion/plugInfo.json and tools/*/bin/. The CHANGELOG says the same.

Type of change

  • Bug fix
  • Feature or behavior change
  • Documentation or test change
  • Build or maintenance change

Validation

Windows, ost 0.23.6 (the pinned CLI). The old source-tree outputs were deleted first, and git status showed nothing new at every step:

  • ost build + ost test: 53/53. Compared with main, the ctest definitions differ only in paths: source-tree lib//bin/ became the binary-tree stage. ost filled all three tool stages from the build tree.
  • ost plugin build plugins/execMotion, which now reports bundle-stage/lib and bundle-stage/plugin/...; then ost plugin test (OK), ost plugin package (matched (ost-managed)), and ost plugin test --from-package (OK).
  • ost plugin package --workspace: one bundle and three tools.
  • Plain CMake with the Visual Studio generator: 53/53, with the stages under <member>/Release/.
  • cmake --install puts lib/libExecMotion.dll and plugin/resources/execMotion/plugInfo.json into the prefix. The three tools and execMotion were then built and tested standalone against that prefix: all pass.
  • motion_convert was run with no --profile-dir and no USDMOTION_PROFILE_PATH from 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

  • The change is focused and ready for review.
  • I added or updated tests when behavior changed.
  • I updated the owning documentation when a public fact or capability changed.
  • I did not add a motion capture, clip, avatar model or screenshot without redistribution permission.
  • This pull request does not contain a security report.

🤖 Generated with Claude Code

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>
@snkmcb
snkmcb merged commit 338db50 into main Sep 24, 2026
6 checks passed
@snkmcb
snkmcb deleted the chore/stage-in-binary-tree branch September 24, 2026 03:19
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