-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
58 lines (54 loc) · 1.82 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
cmake_minimum_required(VERSION 3.29)
project(BallGameTheGame)
set(CMAKE_CXX_STANDARD 20)
set(RAYLIB_VERSION 5.0)
find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED
if (NOT raylib_FOUND) # If there's none, fetch and build raylib
include(FetchContent)
FetchContent_Declare(
raylib
DOWNLOAD_EXTRACT_TIMESTAMP OFF
URL https://github.com/raysan5/raylib/archive/refs/tags/${RAYLIB_VERSION}.tar.gz
)
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
add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR})
endif()
endif()
add_executable(BallGameTheGame Main.cpp
Shapes/Shape.cpp
Shapes/Shape.h
Game/Game.cpp
Game/Game.h
Util.cpp
Util.h
Shapes/CircleShape.cpp
Shapes/CircleShape.h
Shapes/TriangleShape.cpp
Shapes/TriangleShape.h
Shapes/GoldCircleShape.cpp
Shapes/GoldCircleShape.h
Shapes/ScoreText.cpp
Shapes/ScoreText.h
Menus/MainMenu.cpp
Menus/MainMenu.h
Particles/Particle.cpp
Particles/Particle.h
Particles/PlayerDeathParticle.cpp
Particles/PlayerDeathParticle.h
Particles/ShapeParticles.cpp
Particles/ShapeParticles.h
Particles/PlayerMovementParticles.cpp
Particles/PlayerMovementParticles.h
Buttons/Button.cpp
Buttons/Button.h
Buttons/TextureButton.cpp
Buttons/TextureButton.h
Buttons/RegularButton.cpp
Buttons/RegularButton.h
Menus/UpgradeMenu.cpp
Menus/UpgradeMenu.h)
target_link_libraries(BallGameTheGame raylib)