mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-06 11:12:19 +00:00
adding subject given cmake instructions
This commit is contained in:
+18
-2
@@ -1,8 +1,24 @@
|
|||||||
cmake_minimum_required(VERSION 3.19)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.11)
|
||||||
project(Bomberman)
|
project(Bomberman)
|
||||||
|
|
||||||
|
FIND_PACKAGE(raylib REQUIRED)
|
||||||
|
TARGET_LINK_LIBRARIES(target_name raylib)
|
||||||
|
|
||||||
|
if (NOT raylib_FOUND)
|
||||||
|
INCLUDE(FetchContent)
|
||||||
|
FetchContent_Declare(raylib URL https://github.com/raysan5/raylib/archive/master.tar.gz)
|
||||||
|
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})
|
||||||
|
SET(raylib_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
add_executable(bomberman
|
add_executable(bomberman
|
||||||
sources/main.cpp
|
sources/main.cpp
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user