Skip to content

cvcGL: derive the package version from libcvc's (was hardcoded 3.0) - #593

Merged
transfix merged 1 commit into
masterfrom
fix/cvcgl-package-version
Oct 9, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/cvcgl-package-version

Conversation

@transfix

@transfix transfix commented Oct 9, 2026

Copy link
Copy Markdown
Owner

What

src/cvcGL/CMakeLists.txt declared project(cvcGL VERSION 3.0). Every cvcgl bundle's cvcGLConfigVersion.cmake therefore reported PACKAGE_VERSION "3.0" regardless of the release. A consumer asking for find_package(cvcGL 3.5 CONFIG) rejected a correct 3.5 cvcGL; CVC-DBG/cvcdbg#175 had to leave cvcGL unversioned because of it. libcvc already fixed the same bug for its own cvc package (see src/cvc/CMakeLists.txt).

cvcGL ships in lockstep with libcvc, so it now takes libcvc's version:

  • in-tree: from the enclosing project(libcvc VERSION …), via libcvc_VERSION;
  • standalone: the cvcgl recipe builds -S src/cvcGL. Here it parses that VERSION line from the top-level CMakeLists.txt, the single source of truth the cvc package and the recipe-version CI gate already use.

If neither yields a version, configure fails with a clear error.

SOVERSION stays 3, so the runtime name libcvcGL.so.3 is unchanged. Only the file suffix (.so.3.0 → .so.3.5.x) and the exported package version move. The recipe packs lib/libcvcGL* by glob, and nothing in the repo pins a cvcGL version or file name.

Verification

Checked locally against an installed libcvc 3.5.0 prefix:

  • Standalone (cmake -S src/cvcGL, as the recipe does): prints cvcGL version: 3.5.0, and the generated cvcGLConfigVersion.cmake reads PACKAGE_VERSION "3.5.0" (it was "3.0").
  • Consumer semantics (SameMajorVersion), loading the generated file:
    • find_package(cvcGL 3.5) and 3.0 → compatible;
    • 3.5.1 and 4.0 → not compatible.
  • In-tree (top-level configure with CVC_BUILD_CVCGL=ON): prints cvcGL version: 3.5.0 and writes the same version file. That configure later stops on Target "Boost::filesystem" not found, which unmodified master hits identically against this local prefix, so it's unrelated.

Follow-up once this ships: cvcdbg can switch to find_package(cvcGL 3.5 CONFIG REQUIRED).

src/cvcGL/CMakeLists.txt declared project(cvcGL VERSION 3.0), so every cvcgl
bundle's cvcGLConfigVersion.cmake reported PACKAGE_VERSION "3.0" whatever the
release -- a consumer asking find_package(cvcGL 3.5 CONFIG) rejected a 3.5
cvcGL (CVC-DBG/cvcdbg#175 had to leave cvcGL unversioned because of it). The
same bug libcvc fixed for its own cvc package.

cvcGL ships in lockstep with libcvc, so it now takes libcvc's version: in-tree
from the enclosing project(libcvc VERSION ...) (libcvc_VERSION), standalone
(the cvcgl recipe's -S src/cvcGL) by parsing that line from the top-level
CMakeLists.txt -- the single source of truth the cvc package and the
recipe-version CI gate already use -- and failing loudly if neither works.

SOVERSION stays 3, so the runtime name libcvcGL.so.3 is unchanged; only the
file suffix (.so.3.0 -> .so.3.5.x) and the exported package version move.
@transfix
transfix merged commit 9468abe into master Oct 9, 2026
14 checks passed
@transfix
transfix deleted the fix/cvcgl-package-version branch October 10, 2026 03:38
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