KhronosGroup / KhronosGroup/OpenCOLLADA

OpenCOLLADAConfigVersion.cmake always results in "0.1.0" version

Open Beginner friendly
#668 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
678
Forks
260
PR merge metrics
No merged PRs in 30d

Description

See example below:

set(PACKAGE_VERSION "0.1.0")

if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()

  if("0.1.0" MATCHES "^([0-9]+)\\.")
    set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
    if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
      string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
    endif()
  else()
    set(CVF_VERSION_MAJOR "0.1.0")
  endif()

It's a consequence of version being hardcoded in cmakelists.txt, but never bumped:

https://github.com/KhronosGroup/OpenCOLLADA/blob/6031fa956e1da4bbdd910af3a8f9e924ef0fca7a/CMakeLists.txt#L156-L159

And then this version passed to -version.cmake:
https://github.com/KhronosGroup/OpenCOLLADA/blob/6031fa956e1da4bbdd910af3a8f9e924ef0fca7a/CMakeLists.txt#L301-L303

Which makes find_package(OpenCOLLADA 1.6.68 REQUIRED) always break, because version never matches.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in CMakeLists.txt around lines 156-159, where the project version is hardcoded, and lines 301-303, where it is passed to OpenCOLLADAConfigVersion.cmake. Check the generated version file with a find_package(OpenCOLLADA 1.6.68 REQUIRED) configuration; done means the package version reflects the project release instead of always being 0.1.0 and the lookup succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.