-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (34 loc) · 1.06 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 3.0)
project(Game)
add_executable(Game src/main.cpp src/physics.cpp)
target_include_directories(Game PRIVATE include)
# raylib-cpp
find_package(raylib QUIET)
if (NOT raylib_FOUND)
include(FetchContent)
FetchContent_Declare(
raylib
GIT_REPOSITORY https://github.com/raysan5/raylib.git
GIT_TAG 4.5.0
)
FetchContent_MakeAvailable(raylib)
endif()
find_package(raylib_cpp QUIET)
if (NOT raylib_cpp_FOUND)
include(FetchContent)
FetchContent_Declare(
raylib_cpp
GIT_REPOSITORY https://github.com/RobLoach/raylib-cpp.git
GIT_TAG v4.5.1
)
FetchContent_MakeAvailable(raylib_cpp)
endif()
# set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11)
target_link_libraries(${PROJECT_NAME} raylib raylib_cpp)
# bullet
target_include_directories(Game PRIVATE libs/bullet3/src)
add_subdirectory(libs/bullet3)
target_link_libraries(Game BulletDynamics BulletCollision LinearMath)
# flecs
add_subdirectory(libs/flecs)
target_link_libraries(${PROJECT_NAME} flecs::flecs_static)