Skip to content

Make the installed CMake package reusable - #263

Open
jeongseok-meta wants to merge 3 commits into
facebookresearch:mainfrom
jeongseok-meta:fix-installed-cmake-package
Open

Make the installed CMake package reusable#263
jeongseok-meta wants to merge 3 commits into
facebookresearch:mainfrom
jeongseok-meta:fix-installed-cmake-package

Conversation

@jeongseok-meta

@jeongseok-meta jeongseok-meta commented Aug 15, 2026

Copy link
Copy Markdown

Summary

  • Add an opt-in VRS_USE_SYSTEM_RAPIDJSON mode for package managers while preserving the pinned RapidJSON fallback by default.
  • Resolve dependencies before importing vrslib targets and reuse the installed Ocean export instead of fetching Ocean in downstream projects.
  • Use GNU install directories consistently and install PODMacro.inc, which is required by public VRS headers.
  • Install VRS in Pixi CI and build sample_project against the installed CMake package on all four CI platforms.

Motivation

The installed CMake package currently cannot be consumed reliably: exported targets are imported before their dependency targets exist, Ocean is fetched and rebuilt in the downstream project, and a required public include file is omitted from the install. Package managers also need a supported way to use a maintained system RapidJSON package without replacing the upstream finder.

This generalizes the workaround currently carried by conda-forge:
https://github.com/conda-forge/vrs-feedstock/blob/main/recipe/patches/0001-use-conda-deps-in-cmake-config.patch

Related to #147.

Test plan

  • pixi run test: all 265 tests passed
  • pixi run test-consumer
  • Fresh configure and build of sample_project against the installed vrslibConfig; no dependencies were downloaded by the consumer
  • Current-head Pixi CI passed on Ubuntu, Windows, macOS 14, and macOS latest
  • Current-head standard build CI passed all seven XPRS and NVCODEC jobs

CI note

The Pixi environment uses the maintained RapidJSON post20240409 snapshot and retains libcxx 16 on macOS to match the existing cxx-compiler 1.6 clang-16 toolchain. An unconstrained RapidJSON solve upgraded libcxx to 22, which is not compatible with that pinned compiler.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant