forked from fdel-car/bomberman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
132 lines (120 loc) · 3.91 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
cmake_minimum_required(VERSION 3.8)
project(SuperBomberman)
set(GLFW_BUILD_DOCS OFF)
set(GLFW_BUILD_TESTS OFF)
set(GLFW_BUILD_EXAMPLES OFF)
add_subdirectory(libs/glfw-3.2.1)
set(CMAKE_BUILD_TYPE "Release")
set(SFML_BUILD_DOC OFF)
set(SFML_BUILD_GRAPHICS OFF)
set(SFML_BUILD_WINDOW OFF)
set(SFML_BUILD_NETWORK OFF)
set(SFML_BUILD_AUDIO ON)
set(SFML_BUILD_EXAMPLES OFF)
add_subdirectory(libs/SFML-2.5.1)
set(ASSIMP_BUILD_TESTS OFF)
add_subdirectory(libs/assimp-4.1.0)
include_directories("scrs")
set(SRCS
srcs/main.cpp
libs/srcs/glad/glad.cpp
srcs/engine/Entity.cpp
srcs/engine/AudioManager.cpp
srcs/engine/Collider.cpp
srcs/engine/AGame.cpp
srcs/engine/GameEngine.cpp
srcs/engine/GameRenderer.cpp
srcs/engine/ShaderProgram.cpp
srcs/engine/Joint.cpp
srcs/engine/Camera.cpp
srcs/engine/Light.cpp
srcs/engine/Model.cpp
srcs/engine/Mesh.cpp
srcs/engine/Skybox.cpp
srcs/engine/GUI/GUI.cpp
srcs/game/Bomberman.cpp
srcs/game/Save.cpp
srcs/game/scenes/SceneTools.cpp
srcs/game/scenes/MainMenu.cpp
srcs/game/scenes/Forest.cpp
srcs/game/scenes/Pokemon.cpp
srcs/game/scenes/Load.cpp
srcs/game/scenes/Mario.cpp
srcs/game/scenes/Space.cpp
srcs/game/scenes/Credits.cpp
srcs/game/entities/Player.cpp
srcs/game/entities/Bomb.cpp
srcs/game/entities/AEnemy.cpp
srcs/game/entities/EnemyBasic.cpp
srcs/game/entities/EnemyRunAway.cpp
srcs/game/entities/EnemyBomber.cpp
srcs/game/entities/EnemyMelee.cpp
srcs/game/entities/Explosion.cpp
srcs/game/entities/Box.cpp
srcs/game/entities/Damageable.cpp
srcs/game/entities/Perk.cpp
srcs/game/entities/Portal.cpp
)
include_directories("includes")
include_directories("libs/includes")
include_directories("libs/assimp-4.1.0/include" "build/libs/assimp-4.1.0/include")
set(HEADERS
libs/includes/glad/glad.h
libs/includes/KHR/khrplatform.h
libs/includes/nuklear/nuklear.h
libs/includes/glm/glm.hpp
libs/includes/glm/gtc/matrix_transform.hpp
libs/includes/glm/gtc/type_ptr.hpp
libs/includes/json/json.hpp
includes/engine/Engine.hpp
includes/engine/Entity.hpp
includes/engine/AudioManager.hpp
includes/engine/Collider.hpp
includes/engine/AGame.hpp
includes/engine/GameEngine.hpp
includes/engine/GameRenderer.hpp
includes/engine/ShaderProgram.hpp
includes/engine/Joint.hpp
includes/engine/Camera.hpp
includes/engine/Light.hpp
includes/engine/Model.hpp
includes/engine/Mesh.hpp
includes/engine/Skybox.hpp
includes/engine/GUI/GUI.hpp
includes/game/Bomberman.hpp
includes/game/Save.hpp
includes/game/scenes/MainMenu.hpp
includes/game/scenes/Forest.hpp
includes/game/scenes/Pokemon.hpp
includes/game/scenes/Load.hpp
includes/game/scenes/Mario.hpp
includes/game/scenes/Space.hpp
includes/game/scenes/Credits.hpp
includes/game/entities/Player.hpp
includes/game/entities/Bomb.hpp
includes/game/entities/AEnemy.hpp
includes/game/entities/EnemyBasic.hpp
includes/game/entities/EnemyRunAway.hpp
includes/game/entities/EnemyBomber.hpp
includes/game/entities/EnemyMelee.hpp
includes/game/entities/Explosion.hpp
includes/game/entities/Box.hpp
includes/game/entities/Damageable.hpp
includes/game/entities/Perk.hpp
includes/game/entities/Portal.hpp
includes/game/scenes/SceneTools.hpp
)
add_executable(super_bomberman ${SRCS} ${HEADERS})
if(MSVC)
target_compile_options(glfw PRIVATE /W2)
target_compile_options(sfml-audio PRIVATE /W2)
target_compile_options(assimp PRIVATE /W2)
target_compile_options(super_bomberman PRIVATE /W4 /WX)
else()
target_compile_options(glfw PRIVATE -Wno-deprecated -Wno-macro-redefined)
target_compile_options(sfml-audio PRIVATE -Wno-deprecated)
target_compile_options(assimp PRIVATE -Wno-deprecated -Wno-delete-non-virtual-dtor -Wno-address-of-packed-member -Wno-unused-private-field)
target_compile_options(super_bomberman PRIVATE -Wall -Wextra -Werror)
endif()
target_compile_features(super_bomberman PRIVATE cxx_std_11)
target_link_libraries(super_bomberman glfw sfml-audio assimp)