update cmake for CPM.cmake

This commit is contained in:
n0ffie 2025-03-10 20:18:12 +01:00
parent 9f616e196c
commit bf0c7ab8ef
6 changed files with 2636 additions and 26 deletions

View file

@ -20,32 +20,19 @@ set(USE_FOLDERS ON) # Organize targets into fold
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) # Build static libraries by default
include(FetchContent)
include(cmake/CPM.cmake)
CPMAddPackage(
NAME raylib
GITHUB_REPOSITORY raysan5/raylib
GIT_TAG 5.5
)
# Raylib 5.5
find_package(raylib 5.5)
if(NOT raylib_FOUND)
FetchContent_Declare(
raylib
GIT_REPOSITORY https://github.com/raysan5/raylib.git
GIT_TAG 5.5
)
FetchContent_MakeAvailable(raylib)
endif()
# Flecs
find_package(flecs QUIET)
if(NOT flecs_FOUND)
FetchContent_Declare(
flecs
GIT_REPOSITORY https://github.com/SanderMertens/flecs.git
GIT_TAG v4.0.4
)
FetchContent_MakeAvailable(flecs)
endif()
CPMAddPackage(
NAME flecs
GITHUB_REPOSITORY SanderMertens/flecs
GIT_TAG v4.0.4
)
## alyson engine (needs flecs and raylib)
set(ASSETS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/assets/")