From 1b6eb5be2b32bc64fcc67b270da872544ca7904d Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Thu, 14 Mar 2024 11:25:49 -0400 Subject: [PATCH 1/2] Update CMakeLists.txt Fixes #302 @Roy-Fokker something like this? --- projects/CMake/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt index 6a530377..9f824c26 100644 --- a/projects/CMake/CMakeLists.txt +++ b/projects/CMake/CMakeLists.txt @@ -17,11 +17,13 @@ endif() # raylib-cpp find_package(raylib_cpp QUIET) if (NOT raylib_cpp_FOUND) + set(RAYLIB_CPP_VERSION v5.0.1) include(FetchContent) FetchContent_Declare( raylib_cpp GIT_REPOSITORY https://github.com/RobLoach/raylib-cpp.git - GIT_TAG v5.0.1 + GIT_TAG ${RAYLIB_CPP_VERSION} + FIND_PACKAGE_ARGS NAMES raylib_cpp ) FetchContent_MakeAvailable(raylib_cpp) endif() From 3900d2492e55aa5f7bd66f02746d8f1da11fef9b Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Thu, 4 Apr 2024 17:00:50 -0400 Subject: [PATCH 2/2] Apply suggestions from code review --- projects/CMake/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt index 9f824c26..f645bdf3 100644 --- a/projects/CMake/CMakeLists.txt +++ b/projects/CMake/CMakeLists.txt @@ -17,13 +17,14 @@ endif() # raylib-cpp find_package(raylib_cpp QUIET) if (NOT raylib_cpp_FOUND) - set(RAYLIB_CPP_VERSION v5.0.1) + if (NOT DEFINED RAYLIB_CPP_VERSION) + set(RAYLIB_CPP_VERSION v5.0.1) + endif() include(FetchContent) FetchContent_Declare( raylib_cpp GIT_REPOSITORY https://github.com/RobLoach/raylib-cpp.git GIT_TAG ${RAYLIB_CPP_VERSION} - FIND_PACKAGE_ARGS NAMES raylib_cpp ) FetchContent_MakeAvailable(raylib_cpp) endif()