eco2d/cmake/FindRaylib.cmake

21 lines
479 B
CMake
Raw Normal View History

2021-01-19 11:02:17 +00:00
find_package(raylib 3.5 QUIET)
if (NOT raylib_FOUND)
include(FetchContent)
FetchContent_Declare(
raylib
2021-08-11 17:38:24 +00:00
URL https://github.com/zpl-c/raylib/archive/master.tar.gz
2021-01-19 11:02:17 +00:00
)
FetchContent_GetProperties(raylib)
if (NOT raylib_POPULATED)
set(FETCHCONTENT_QUIET NO)
FetchContent_Populate(raylib)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR})
endif()
endif()