mirror of
https://github.com/NickTheFox99/ChristmOS.git
synced 2026-06-29 01:05:19 -04:00
Update CMakeLists.txt
This commit is contained in:
@@ -7,8 +7,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|||||||
# Dependencies
|
# Dependencies
|
||||||
set(RAYLIB_VERSION 5.5)
|
set(RAYLIB_VERSION 5.5)
|
||||||
find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED
|
find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED
|
||||||
if(NOT raylib_FOUND) # If there's none, fetch and build raylib
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
set(FETCHCONTENT_QUIET NO)
|
||||||
|
if(NOT raylib_DIR) # If there's none, fetch and build raylib
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
raylib
|
raylib
|
||||||
DOWNLOAD_EXTRACT_TIMESTAMP OFF
|
DOWNLOAD_EXTRACT_TIMESTAMP OFF
|
||||||
@@ -16,26 +17,16 @@ if(NOT raylib_FOUND) # If there's none, fetch and build raylib
|
|||||||
)
|
)
|
||||||
FetchContent_GetProperties(raylib)
|
FetchContent_GetProperties(raylib)
|
||||||
if(NOT raylib_POPULATED) # Have we downloaded raylib yet?
|
if(NOT raylib_POPULATED) # Have we downloaded raylib yet?
|
||||||
set(FETCHCONTENT_QUIET NO)
|
|
||||||
FetchContent_MakeAvailable(raylib)
|
FetchContent_MakeAvailable(raylib)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RAYLIB_CPP_VERSION "v5.5.0")
|
|
||||||
find_package(raylib_cpp QUIET) # QUIET or REQUIRED
|
|
||||||
if(NOT raylib_cpp_FOUND) # If there's none, fetch and build raylib
|
|
||||||
include(FetchContent)
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
raylib_cpp
|
raylib_cpp
|
||||||
DOWNLOAD_EXTRACT_TIMESTAMP OFF
|
GIT_REPOSITORY https://github.com/RobLoach/raylib-cpp.git
|
||||||
URL https://github.com/RobLoach/raylib-cpp/archive/refs/tags/${RAYLIB_CPP_VERSION}.tar.gz
|
GIT_TAG master
|
||||||
)
|
)
|
||||||
FetchContent_GetProperties(raylib_cpp)
|
|
||||||
if(NOT raylib_cpp_POPULATED) # Have we downloaded raylib yet?
|
|
||||||
set(FETCHCONTENT_QUIET NO)
|
|
||||||
FetchContent_MakeAvailable(raylib_cpp)
|
FetchContent_MakeAvailable(raylib_cpp)
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Our Project
|
# Our Project
|
||||||
add_executable(${PROJECT_NAME})
|
add_executable(${PROJECT_NAME})
|
||||||
|
|||||||
Reference in New Issue
Block a user