mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 10:59:00 +00:00
17 lines
613 B
CMake
17 lines
613 B
CMake
find_package(raylib 2.0 QUIET)
|
|
if (NOT raylib_FOUND)
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
raylib
|
|
GIT_REPOSITORY https://github.com/raysan5/raylib.git
|
|
GIT_TAG 6f2f09947f5456cefb3d91d3f667f4d72fa55be6
|
|
)
|
|
FetchContent_GetProperties(raylib)
|
|
if (NOT raylib_POPULATED) # Have we downloaded raylib yet?
|
|
set(FETCHCONTENT_QUIET NO)
|
|
FetchContent_Populate(raylib)
|
|
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # don't build the supplied examples
|
|
set(BUILD_GAMES OFF CACHE BOOL "" FORCE) # or games
|
|
add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR})
|
|
endif()
|
|
endif() |