Repository navigation
cvcGL: derive the package version from libcvc's (was hardcoded 3.0) - #593
Merged
Merged
Conversation
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.
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.
What
src/cvcGL/CMakeLists.txtdeclaredproject(cvcGL VERSION 3.0). Every cvcgl bundle'scvcGLConfigVersion.cmaketherefore reportedPACKAGE_VERSION "3.0"regardless of the release. A consumer asking forfind_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 owncvcpackage (seesrc/cvc/CMakeLists.txt).cvcGL ships in lockstep with libcvc, so it now takes libcvc's version:
project(libcvc VERSION …), vialibcvc_VERSION;-S src/cvcGL. Here it parses thatVERSIONline from the top-levelCMakeLists.txt, the single source of truth thecvcpackage and the recipe-version CI gate already use.If neither yields a version, configure fails with a clear error.
SOVERSIONstays3, so the runtime namelibcvcGL.so.3is unchanged. Only the file suffix (.so.3.0→.so.3.5.x) and the exported package version move. The recipe packslib/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:
cmake -S src/cvcGL, as the recipe does): printscvcGL version: 3.5.0, and the generatedcvcGLConfigVersion.cmakereadsPACKAGE_VERSION "3.5.0"(it was"3.0").SameMajorVersion), loading the generated file:find_package(cvcGL 3.5)and3.0→ compatible;3.5.1and4.0→ not compatible.CVC_BUILD_CVCGL=ON): printscvcGL version: 3.5.0and writes the same version file. That configure later stops onTarget "Boost::filesystem" not found, which unmodifiedmasterhits 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).