Skip to content

fix(publish): install sdl3 for cvcgl SDK + pycvc-gl so the SDL seam actually links - #444

Merged
transfix merged 1 commit into
masterfrom
fix/cvcgl-publish-install-sdl3
Sep 28, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/cvcgl-publish-install-sdl3

Conversation

@transfix

Copy link
Copy Markdown
Owner

Problem

The cvc.4 SDL3 dep bump (#440) shipped, but published cvcgl bundles fall back to the VTK interactor — the SDL input seam is not in them:

cvcGL: SDL3 not found -- input seam falls back to the VTK interactor

sdl3 is a declared cvcgl dep but not part of libcvc's install-deps closure (libcvc doesn't depend on sdl3; cvcgl does), and the cvcgl build steps in publish-cvcpkg.yml hand-install only imgui into a dedicated prefix. So find_package(SDL3 CONFIG) fails and the published static libcvcGL.a is compiled with CVC_ENABLE_SDL off. The recipe CI exercises the SDL3 link; the publish path never did.

Fix

Install sdl3 into its own prefix and add it to CMAKE_PREFIX_PATH, mirroring the existing imgui handling, in all four native cvcgl build steps:

Step Why
cvcgl SDK [Linux] packs cvc/cvcgl — must link SDL3
cvcgl SDK [Windows] packs cvc/cvcgl — must link SDL3
pycvc-gl [Linux] find_package(cvcGL) against stage-cvcgl
pycvc-gl [Windows] find_package(cvcGL) against stage-cvcgl

The pycvc-gl steps are required, not optional: once the SDK links SDL3::SDL3, cvcGLConfig.cmake emits find_dependency(SDL3), so anything that find_package(cvcGL) against the freshly built stage-cvcgl needs sdl3 on its prefix — the exact reason those steps already install imgui. Without this, pycvc-gl would fail to configure.

Safety

  • Relocatable: cvcGL links the imported SDL3::SDL3 target (a name, not a path) and emits find_dependency(SDL3) via @CVCGL_SDL_DEP@ — no builder path leaks into cvcGLTargets.cmake (same discipline as imgui, verified in src/cvcGL/CMakeLists.txt + cvcGLConfig.cmake.in).
  • Installable: sdl3 is in the catalog for linux-x86_64 and windows-x86_64 (3.4.12+cvc.3).
  • Scope: native only. macOS/linux… (cvcgl publishes to linux + windows only per the recipe matrix); wasm is deliberately deferred to its own step. cvcgl-examples is untouched (it builds its own cvcGL from a prefix without stage-cvcgl/sdl3, so it stays a self-consistent VTK-fallback build).

Validation caveat

publish-cvcpkg runs only on workflow_dispatch / push-to-master, so this change is not exercised by PR CI — the first publish re-run from master is the real validation of the native SDL3 link. Pairs with #443 (the Windows-release packaging fix); together a re-run produces a cvcgl cvc.5 bundle that actually links the SDL seam on linux + windows.

…ctually links

The cvc.4 SDL3 dep bump shipped, but published cvcgl bundles log
`cvcGL: SDL3 not found -- input seam falls back to the VTK interactor`:
SDL3 is a declared cvcgl dep but NOT part of libcvc's install-deps
closure (libcvc doesn't depend on sdl3; cvcgl does), and the cvcgl build
steps hand-install only imgui into a dedicated prefix. So
find_package(SDL3 CONFIG) fails and the published static libcvcGL.a is
compiled WITHOUT the SDL input seam (CVC_ENABLE_SDL off) — the recipe CI
exercises the link, but the PUBLISH path never did.

Install sdl3 into its own prefix and add it to CMAKE_PREFIX_PATH,
mirroring the existing imgui handling, in all four native cvcgl build
steps:

  - cvcgl SDK    [Linux]  (packs cvc/cvcgl)
  - cvcgl SDK    [Windows](packs cvc/cvcgl)
  - pycvc-gl     [Linux]  (find_package(cvcGL) against stage-cvcgl)
  - pycvc-gl     [Windows](find_package(cvcGL) against stage-cvcgl)

The pycvc-gl steps are REQUIRED, not optional: once the SDK links
SDL3::SDL3, cvcGLConfig.cmake emits find_dependency(SDL3), so anything
that find_package(cvcGL) against the freshly built stage-cvcgl needs
sdl3 on its prefix — exactly the reason those steps already install
imgui. Without this, pycvc-gl would fail to configure.

cvcGL links the relocatable SDL3::SDL3 imported target and emits
find_dependency(SDL3) into its config (@CVCGL_SDL_DEP@), so no builder
path leaks into cvcGLTargets.cmake (same discipline as imgui). sdl3 is
in the catalog for linux-x86_64 and windows-x86_64 (3.4.12+cvc.3), so
the installs resolve.

Native only (linux/macos have no cvcgl; wasm is deliberately deferred as
its own step). cvcgl-examples is untouched: it builds its own cvcGL from
a prefix without stage-cvcgl or sdl3, so it stays a self-consistent
VTK-fallback build.

NB: publish-cvcpkg runs only on workflow_dispatch/push-to-master, so this
is not exercised by PR CI — the first publish re-run from master is the
real validation of the SDL3 native link.
@transfix
transfix merged commit cb88390 into master Sep 28, 2026
13 checks passed
transfix added a commit that referenced this pull request Sep 28, 2026
Every wasm-mt cvcgl bundle so far shipped the VTK-interactor fallback:
publish-cvcgl-wasm's $WASM_DEPS closure never installed sdl3, so
find_package(SDL3 CONFIG) failed under emcmake and CVC_ENABLE_SDL was
off — the wasm SDK carried no SDL input/peripheral seam even though its
manifest declared sdl3.

Add sdl3 to $WASM_DEPS. The build already passes
-DCMAKE_FIND_ROOT_PATH="$WASM_DEPS", so cvcGL's find_package(SDL3 CONFIG)
now resolves it → links the relocatable SDL3::SDL3 → CVC_ENABLE_SDL on →
cvcGLConfig emits find_dependency(SDL3). Feasibility checks: sdl3 wasm-mt
is a published static bundle (3.4.12+cvc.4); no Emscripten -sUSE_SDL port
is in play (no clash with a built-in SDL); SdlInput.cpp is fully
CVC_ENABLE_SDL-guarded; SDL-on-wasm-mt is verified working with VTK.

Fail-loud check: since sdl3 is now present, cvcGL MUST link it — the
build step errors if cvcGLConfig lacks find_dependency(SDL3), so we never
ship a "SDL3" revision that silently fell back to VTK.

cvcgl cvc_revision 5 -> 6: publish-cvcgl-wasm packs cvcgl VERBATIM at the
recipe revision, so a bump is required to republish the SDL3-linked wasm
bundle. cvcGL source unchanged; native lanes auto-bump independently and
are unaffected (they already link SDL3 via #444).

NB publish-cvcgl-wasm runs only on workflow_dispatch, so this is NOT
exercised by PR CI — the first wasm publish run is the real validation of
the SDL3-under-emscripten link (the one genuinely untested path).
@transfix
transfix deleted the fix/cvcgl-publish-install-sdl3 branch October 29, 2026 20:53
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