Adopt one CMake dependency contract for plain CMake and ost - #22
Merged
Merged
Conversation
Inside the repository an edge is the in-tree target when it exists and
the installed package otherwise; outside it, always an installed package,
found by the component that links it. The adapters now declare
motionRetarget and motionCore themselves, and the root lists no external
package but OpenUSD, which it still resolves once as the boundary the pure
libraries are added before.
The shared CMake is one module per concern, and hides no add_library(),
target_link_libraries() or dependency declaration:
- UsdMmdProject: USDMMD_VERSION from VERSION, and usdmmd_component() for
the C++ standard, the single-config Release default and the tests
option. The per-component version fallbacks are gone; check_docs.py
now holds every project() to ${USDMMD_VERSION} instead.
- UsdMmdSanitizers: USDMMD_SANITIZERS and USDMMD_BUILD_FUZZERS replace
the five per-component option pairs, applied per target by
usdmmd_target_defaults() rather than by directory-scoped flags.
- UsdMmdPackage: usdmmd_install_library(), one layout, one
SameMinorVersion policy and one export for every plain library.
- UsdMmdTesting: test executables, boundary tests, the test interpreter,
and OpenUSD on PATH for the adapter tests, which load its DLLs through
the motion packages and failed outside an ost session.
- UsdMmdOpenUsd: usdmmd_find_openusd() runs pxrConfig.cmake only where
OpenUSD's targets are not yet visible, as usd-motion-plugins' configs
do, and checks the pin at every entry point.
CMakePresets.json no longer reads USD_INSTALL_ROOT; the caller passes the
dependency prefix as CMAKE_PREFIX_PATH. The installed-consumer lane runs
its adapter probe with OpenUSD on PATH for the same reason as the tests.
Staging the plugin and tools out of the source tree is not part of this:
ost 0.23.3 reads a bundle's plugInfo.json and lib/ from its source
directory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WORKSPACE.md §5 now states the three build modes as one contract -- who declares an edge, how installed packages carry transitive edges, how OpenUSD is resolved, what the cmake/ modules provide -- and records that the plugin and tools are staged in their source directories because ost 0.23.3 reads them there. building.md gains the single-component plain-CMake build and the new sanitizer options, and every plain-CMake command in it was run again on 2026-09-24. docs/reports/ost/ starts with report 01: the contract needs nothing from ost, and staging the bundle into its build tree builds but fails `ost plugin test` from L0 to L5, measured; it asks for verification and packaging from a staged layout. 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
One CMake dependency contract, driven three ways: plain CMake on the repository, plain CMake on a single component, and
ost. The only difference between them is who prepares the dependency prefix (WORKSPACE.md§5).motionRetarget/motionCorethemselves. The root lists no external package except OpenUSD, which it still resolves once, before any component that may link it; the pure libraries are added before that point.CMakePresets.jsonno longer readsUSD_INSTALL_ROOT. The caller passes the prefix asCMAKE_PREFIX_PATH, either as-Dor as the environment variable.cmake/modules, one per concern. None of them hidesadd_library(),target_link_libraries()or a dependency:UsdMmdProject:USDMMD_VERSIONandusdmmd_component(). The per-component version fallbacks are removed, andcheck_docs.pynow requires everyproject()to use${USDMMD_VERSION}.UsdMmdSanitizers:USDMMD_SANITIZERS/USDMMD_BUILD_FUZZERSreplace five per-component option pairs. They are applied per target instead of throughadd_compile_options.UsdMmdPackage:usdmmd_install_library(), giving every plain library one layout, one version policy and one export.UsdMmdTesting: test executables, boundary tests, the test interpreter, and the OpenUSD runtime environment.UsdMmdOpenUsd:usdmmd_find_openusd()runspxrConfig.cmakeonly where OpenUSD's targets are not yet visible, and checks the pin at every entry point.ostsession, the adapter tests and the installed-consumer adapter probe could not start on Windows (0xc0000135), because nothing put OpenUSD's DLLs onPATH. They now set it themselves.ost0.23.3 reads a bundle'splugInfo.jsonandlib/, and a tool's directories, from the source directory. Staging into the build tree was measured: the build succeeds, butost plugin testfails from L0 to L5. This is recorded in the newdocs/reports/ost/as report 01, which asks for verification from a staged layout.The sanitizer workflow uses the new option names.
Test plan
Run locally on Windows (MSVC 19.51, CMake 4.4,
ost0.23.3):cmake --preset windows-msvc -B <new>withCMAKE_PREFIX_PATH= OpenUSD 26.08 plus the three pinned motion artifacts. 32/32 tests pass.mmdPmx,mmdModel,mmdControl,mmdSkeletonAdapter,mmdMotionAdapter,vmd_inspect. Every suite passes, and the bundle configures and builds.ost build+ost testfrom a deleted tree: 32/32.ost plugin build/test plugins/usdMmdFileFormat: 12 pass, 0 fail.ost library build/test libs/mmdMotionAdapterandlibs/mmdPmx, andost library verify-consumer libs/mmdControl.USDMMD_SANITIZERS="address;undefined", run on WSL with GCC 15: all pass.check_docs.pyand--selftest.🤖 Generated with Claude Code