Repository navigation
Ship the cvcgl-examples demos with their UI (imgui in the closure) - #313
Merged
Merged
Conversation
The published cvcgl-examples binaries have no UI at all. imgui is absent from the recipe's closure, and cvcGL's imgui block degrades silently: when find_library misses, ImGuiOverlay compiles to inert stubs, so the demos build, run, pass the ABI smoke test and publish -- with every control panel the demos define compiled out, and nothing in the log saying so. Four changes: - recipe: declare imgui (linux) as both a build and a runtime dependency. It is published shared-only, so libimgui.so is a load-time dep of the demo binaries even though cvcGL itself is linked static into them; the demos' INSTALL_RPATH of $ORIGIN/../lib resolves it out of a consumer's prefix, the same path VTK/Boost already take. cvc_revision 1 -> 2, since a recipe change without a bump no-ops on published catalogs. - build.sh: fail loudly when cvcGL configures without imgui, reading CVC_IMGUI_LIBRARY back out of CMakeCache.txt. imgui is a declared dependency on linux, so a miss is a broken closure rather than a soft option -- this is the gate whose absence let UI-less demos ship. The wasm column links its own static closure and is not covered. - workflow: install imgui from cvcpkg (never apt) into its OWN prefix and join it to CVC_DEPS_PREFIX for the examples step only. The separation is deliberate: cvcGL locates imgui with find_library, so an imgui on the earlier "cvcgl" SDK step's prefix would bake this builder's absolute path into the published cvcGLTargets.cmake. - src/cvcGL/CMakeLists.txt: split the imgui link and include into BUILD_INTERFACE/INSTALL_INTERFACE. cvcGL is a static archive, so an unguarded find_library result propagates verbatim into the exported targets and breaks consumers on another machine with "missing and no known rule to make it" -- the trap the X11 comment directly below already documents and sidesteps by linking that one by name. The export now carries a relocatable -limgui plus include/imgui, matching the bundle's real layout. Keeping the prefixes separate above means the SDK cannot regress even if this guard is later lost.
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.
The problem
The published
cvcgl-examplesbinaries ship with no UI at all.imguiis simply absent from the recipe's closure, and cvcGL's imgui blockdegrades silently: when
find_librarymisses,ImGuiOverlaycompiles toinert stubs. The demos then build, run, pass the ABI smoke test and publish —
with every control panel they define compiled out, and nothing in the log
saying so.
The fix
imgui(linux) as a build and runtime dep;cvc_revision1 → 2Why imgui is a runtime dep too
It is published shared-only, so
libimgui.sois a load-time dep of the demobinaries even though cvcGL itself is linked static into them. The demos'
INSTALL_RPATHof$ORIGIN/../libresolves it out of a consumer's prefix —the same path VTK/Boost already take.
Why a loud gate
This silent degradation is the whole reason UI-less demos shipped.
imguiisa declared dependency on linux, so a miss is a broken closure, not a soft
option —
build.shnow readsCVC_IMGUI_LIBRARYback out ofCMakeCache.txtand fails the build rather than quietly publishing a UI-less demo. The wasm
column links its own static closure and is not covered.
Why a separate imgui prefix
cvcGL locates imgui with
find_library, so putting imgui on the earliercvcglSDK step's prefix would bake this builder's absolute path into thepublished
cvcGLTargets.cmake. The prefixes stay separate so the SDK bundlecannot regress.
Why the export split
cvcGL is a static archive, so an unguarded
find_libraryresult propagatesverbatim into the exported targets and breaks consumers on another machine with
"missing and no known rule to make it" — the exact trap the
X11commentdirectly below already documents, and sidesteps by linking that one by name:
The export now carries a relocatable
-limguiplusinclude/imgui, matchingthe bundle's real layout. (Note the include dir was already
BUILD_INTERFACE-wrapped while the library was not — an inconsistency thissettles.)
Verification
Confirmed against the real
imgui 1.92.9+cvc.1linux bundle that the block'sthree gates are all satisfiable — this is what makes the UI actually appear
rather than the gate merely turning red:
cvcpkg validate cvcpkg/recipes/cvcgl-examplespasses;bash -nand workflowYAML parse clean.