mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-03 10:26:29 +00:00
Fixing the cmake
This commit is contained in:
+4
-2
@@ -1,12 +1,14 @@
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
cmake_minimum_required(VERSION 3.11)
|
||||
project(Bomberman)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/wal)
|
||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/lib/raylib)
|
||||
|
||||
add_executable(bomberman
|
||||
sources/main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(bomberman wal)
|
||||
find_package(raylib REQUIRED)
|
||||
target_link_libraries(bomberman wal raylib)
|
||||
@@ -0,0 +1,20 @@
|
||||
# Usage:
|
||||
# FIND_PACKAGE(raylib REQUIRED)
|
||||
# [...]
|
||||
# TARGET_LINK_LIBRARIES(target_name raylib)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.11)
|
||||
|
||||
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()
|
||||
@@ -24,13 +24,20 @@ add_library(wal
|
||||
sources/Component/Position/PositionComponent.cpp
|
||||
sources/Component/Position/PositionComponent.hpp
|
||||
sources/Models/Vector3.hpp
|
||||
sources/Component/Movable/MovableComponent.cpp sources/Component/Movable/MovableComponent.hpp sources/System/Movable/MovableSystem.cpp sources/System/Movable/MovableSystem.hpp sources/System/System.cpp)
|
||||
sources/Component/Movable/MovableComponent.cpp
|
||||
sources/Component/Movable/MovableComponent.hpp
|
||||
sources/System/Movable/MovableSystem.cpp
|
||||
sources/System/Movable/MovableSystem.hpp
|
||||
sources/System/System.cpp
|
||||
)
|
||||
|
||||
target_include_directories(wal PUBLIC sources)
|
||||
|
||||
add_executable(wal_tests
|
||||
tests/EntityTests.cpp
|
||||
tests/MainTest.cpp tests/tests.hpp tests/EngineTests.cpp)
|
||||
tests/MainTest.cpp
|
||||
tests/EngineTests.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(wal_tests PRIVATE wal)
|
||||
find_package(Catch2 REQUIRED)
|
||||
|
||||
Reference in New Issue
Block a user