diff options
| author | Rob Loach <[email protected]> | 2022-09-17 17:12:57 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-09-17 23:12:57 +0200 |
| commit | 4c3d577ddbe0c36412c146072b0dc813ea5d079c (patch) | |
| tree | 02cce579723e8deaa1cec95162d37e05e8b50e3e | |
| parent | c328f09efccce43293644c8fad0ea0bd7e7c94a9 (diff) | |
| download | raylib-4c3d577ddbe0c36412c146072b0dc813ea5d079c.tar.gz raylib-4c3d577ddbe0c36412c146072b0dc813ea5d079c.zip | |
CMake: Project template fix to easily target raylib version (#2700)
| -rw-r--r-- | projects/CMake/CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt index 351b4809..cfd924fb 100644 --- a/projects/CMake/CMakeLists.txt +++ b/projects/CMake/CMakeLists.txt @@ -5,12 +5,13 @@ project(example) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Dependencies -find_package(raylib 4.2.0 QUIET) # QUIET or REQUIRED +set(RAYLIB_VERSION 4.2.0) +find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED if (NOT raylib_FOUND) # If there's none, fetch and build raylib include(FetchContent) FetchContent_Declare( raylib - URL https://github.com/raysan5/raylib/archive/refs/tags/4.0.0.tar.gz + URL https://github.com/raysan5/raylib/archive/refs/tags/${RAYLIB_VERSION}.tar.gz ) FetchContent_GetProperties(raylib) if (NOT raylib_POPULATED) # Have we downloaded raylib yet? |
