Skip to content

cvcgl: build the SDK bundle WITH Dear ImGui - #369

Merged
transfix merged 1 commit into
masterfrom
fix/cvcgl-sdk-imgui
Sep 15, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/cvcgl-sdk-imgui

Conversation

@transfix

@transfix transfix commented Sep 15, 2026 •

Copy link
Copy Markdown
Owner

Why

The published cvc/cvcgl bundle is built without imgui. Confirmed on the installed 3.4.0+cvc.1: cvcGLTargets.cmake carries no CVC_ENABLE_IMGUI, and ImGuiOverlay.h documents that without it the overlay class is inert. So any GUI consumer of cvc::cvcGL (e.g. cvcgl-examples) gets a dead overlay — which is exactly why those recipes rebuild cvcGL from source with imgui instead of installing the bundle. cvcpkg exists so nobody does that.

The SDK step (L631 Linux / L849 Windows) uses -DCMAKE_PREFIX_PATH="$STAGE;$PY;$DEPS" — no imgui — so cvcGL's find_library(imgui) silently fails and CVC_ENABLE_IMGUI auto-turns off. imgui was deliberately kept off the SDK step to avoid baking its abs path into the export, but that reasoning is obsolete: the export is already $<INSTALL_INTERFACE:imgui> + include/imgui (a relocatable link name, not a builder path). Verified in the current cvcGLTargets.cmake.

What

  • publish-cvcpkg.yml — join imgui to the cvcGL SDK build steps (Linux + Windows) so cvcGL builds CVC_ENABLE_IMGUI=ON. Also add imgui to the pycvc-gl steps (Linux + Windows), which link the now-imgui'd cvcGL and would otherwise fail on the bare -limgui it exports.
  • cvcpkg/recipes/cvcgl/recipe.yaml — declare imgui a build and runtime dep (a consumer of cvc::cvcGL must have imgui in its prefix), bump cvc_revision 1 → 2.

Verified end-to-end

Built cvcGL with imgui locally and rebuilt a downstream consumer's GUI demos through the consumer's own CMakeLists against it: CVC_ENABLE_IMGUI now appears in the exported cvcGLTargets.cmake, the earlier #ifdef-guarded compile failure in the consumer is gone (macro inherited), and the demos compile and link. libimgui resolves once the deps lib dir is on the link path (cvcpkg's build env provides it). This is what lets a downstream recipe drop its from-source cvcGL build and just cvcpkg install cvc/cvcgl && cmake.

Blast radius / follow-ups (flagged, not in this PR)

  • Every cvcGL consumer now links a bare -limgui. Handled here for the in-workflow cvcGL builds. pycvc-gl-cp311-cuda (dormant CUDA host) will need the same imgui prefix when that path is enabled.
  • Downstream repos linking cvcGL (volrover3) must install imgui alongside cvc/cvcgl — the new runtime dep makes cvcpkg install resolve it, but a source build needs the deps lib dir on the link path.
  • Cleaner long-term fix: ship an imgui cmake-config (imgui::imgui imported target) so cvcGL links a target and no consumer wires -limgui by hand.

Republish

This needs a publish-cvcpkg.yml run (dry_run=false) to produce cvcgl 3.4.0+cvc.2 with imgui.

The published cvc/cvcgl bundle was built without imgui — cvc::gl::ImGuiOverlay
was an inert stub and it exported no CVC_ENABLE_IMGUI — so GUI consumers
(dbg_austin_live*, cvcgl-examples) got no working overlay and had to rebuild
cvcGL from source. The stated reason for keeping imgui off the SDK step (avoid
baking imgui's abs path into cvcGLTargets.cmake) is obsolete: the export is
$<INSTALL_INTERFACE:imgui> / include/imgui (a relocatable link name), verified.

- publish-cvcpkg.yml: join imgui to the cvcGL SDK build steps (Linux + Windows)
  so cvcGL builds CVC_ENABLE_IMGUI=ON; add imgui to the pycvc-gl steps (Linux +
  Windows) which link the now-imgui'd cvcGL (bare -limgui in its interface).
- recipes/cvcgl: declare imgui a build+runtime dep (a consumer of cvc::cvcGL must
  have imgui in its prefix); bump cvc_revision 1 -> 2.

Verified end-to-end: an imgui'd cvcGL makes the three cvcdbg demos compile AND
link through cvcdbg's OWN CMakeLists (CVC_ENABLE_IMGUI inherited from the export),
which is what lets the cvcdbg recipe drop its from-source cvcGL build + demo
staging entirely.

Follow-ups (flagged, not in this PR): pycvc-gl-cp311-cuda (dormant CUDA host)
needs the same imgui prefix when enabled; downstream cvcGL consumers (volrover3)
install imgui alongside cvc/cvcgl (now a runtime dep, so cvcpkg resolves it). A
cleaner long-term fix is an imgui cmake-config (imgui::imgui imported target) so
no consumer wires -limgui by hand.
@transfix
transfix merged commit 15c0c9b into master Sep 15, 2026
13 checks passed
@transfix
transfix deleted the fix/cvcgl-sdk-imgui branch September 15, 2026 21:25
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