raysan5/raylib

requesting 5.0.1 version to fix incorrect PROJECT_VERSION in 5.0

aschofie opened this issue · 2 comments

In my vcpkg ports dir for raylib, raylib-config-version.cmake has the following generated:

set(PACKAGE_VERSION "4.5.0")

At the top, but this is for version 5.0. I think I have tracked down the error to src/CMakeLists.txt of the 5.0 tag, which has:

set(PROJECT_VERSION 4.5.0)

What this means is that when I try to include raylib in my CMakeLists.txt with:

find_package(raylib 5.0)

I get the following error:

CMake Warning at /Users/pacs/.vcpkg-clion/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
Could not find a configuration file for package "raylib" that is compatible
with requested version "5.0".

The following configuration files were considered but not accepted:

/Users/pacs/.vcpkg-clion/vcpkg/installed/x64-osx/share/raylib/raylib-config.cmake, version: 4.5.0

Changing the version to 4.5 in my find_package call gives me the 5.0 dependency. What little experience with C++ I have is from long before CMake or vcpkg, and this issue really roughed me up trying to figure this out. Could we please have a 5.0.1 version which is just 5.0, but with PROJECT_VERSION fixed, so others creating projects with the latest version won't be flummoxed like I was? Thanks.

I confirm that the raylib-5.0.zip release has a src/CMakeLists.txt with set(PROJECT_VERSION 4.5.0).

In the current main (version 5.1-dev) the CMakeLists.txt is corrected to set(PROJECT_VERSION 5.0.0) which is also a bit behind. That file was apparently last changed on 2023-12-23. The set(API_VERSION 500) in the current 5.1-dev is also suspect.

Although a 5.0.1 release for that one defect seems unlikely, @raysan5 may want to introduce some means for keeping these all consistent.

@aschofie @orcmid The version was already reviewed but I'm not re-releasing it at the moment. I take not for next version to review it.

As a side note, please note that I'm not the maintainer of CMake build system.