-
Notifications
You must be signed in to change notification settings - Fork 3
/
sophia.pro
169 lines (152 loc) · 4.97 KB
/
sophia.pro
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
TEMPLATE = app
CONFIG += console c++1z
CONFIG -= app_bundle
CONFIG -= qt
# Select modules
#################################
PHYSICS_ENGINE = BULLET
STD_LIB = EASTL # STD
#################################
# General configuration
#################################
INCLUDEPATH += include \
depends/moodycamel/include \
depends/yaml-cpp/include \
depends/glm-0.9.7.4/include \
depends/spdlog/include \
depends/entt/src \
depends/physfs-cpp/include \
depends/EASTL/test/packages/EABase/include/Common \ # A bizarre EASTL dependency setup...
depends/EASTL/include
# depends/assimp-4.1.0/include
QMAKE_CXXFLAGS_RELEASE += -O3 -flto=thin -mavx -msse4.1 -mssse3 -msse3 -msse2 -DGLM_FORCE_INLINE -DSPDLOG_NO_THREAD_ID -DSPDLOG_NO_NAME
QMAKE_CXXFLAGS_DEBUG += -DSPDLOG_DEBUG_ON -DSPDLOG_TRACE_ON -DSPDLOG_NO_THREAD_ID -DSPDLOG_NO_NAME -DDEBUG_BUILD
contains(STD_LIB, EASTL) {
QMAKE_CXXFLAGS_RELEASE += -DUSE_EASTL
QMAKE_CXXFLAGS_DEBUG += -DUSE_EASTL
}
# Conditionally add source files depending on selected physics engine
#################################
contains(PHYSICS_ENGINE, BULLET) {
SOURCES += src/physics/bullet/BulletEngine.cpp
macx {
INCLUDEPATH += /usr/local/include/bullet
LIBS += -L/usr/local/lib/
}
LIBS += -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath
}
# Platform-specific configuration
#################################
# Mac OS X
macx {
QMAKE_LFLAGS += -pagezero_size 10000 -image_base 100000000
INCLUDEPATH += /usr/local/Cellar/sdl2/2.0.8/include \
/usr/local/Cellar/glew/2.1.0/include \
/usr/local/Cellar/physfs/3.0.1/include \
/usr/local/include/luajit-2.0 \
/usr/local/Cellar/tbb/2018_U3_1/include
LIBS += -framework OpenGL \
-L/usr/local/Cellar/sdl2/2.0.8/lib -lSDL2 \
-L/usr/local/Cellar/glew/2.1.0/lib -lGLEW \
-L/usr/local/Cellar/physfs/3.0.1/lib -lphysfs \
-L/usr/local/Cellar/tbb/2018_U3_1/lib -ltbb \
-L$$PWD/depends/EASTL/build -lEASTL \
-lyaml-cpp \
-lluajit-5.1
# $$PWD/depends/assimp-4.1.0/lib/libassimp.dylib
# -F/Library/Frameworks -framework SDL2
}
# Windows
win32 {
!contains(QMAKE_TARGET.arch, x86_64) {
# 32bit Windows
error("32bit is not supported.")
} else {
# 64bit Windows
}
}
# Linux
unix:!macx {
}
# Embedded Dependency Files
#################################
SOURCES += depends/physfs-cpp/src/physfs.cpp \ # Using the static library causes symbol mismatch unless same compiler is used
src/util/Helpers.cpp \
src/ecs/Loader.cpp \
src/graphics/Model.cpp \
src/ecs/ctors/Transform.cpp
# Project Files
#################################
DISTFILES += \
data/shaders/pbr.frag \
data/shaders/pbr.vert \
data/shaders/lamp.frag \
data/shaders/lighting.frag \
data/shaders/lighting.vert \
data/shaders/shadowmap.frag \
data/shaders/shadowmap.vert \
data/shaders/sprites.frag \
data/shaders/tiles.frag \
data/shaders/sprites.vert \
data/shaders/tiles.vert \
data/shaders/gbuffer.frag \
data/shaders/gbuffer.vert \
data/shaders/pbr.frag \
data/shaders/deferredlighting.vert \
data/shaders/debug.frag \
data/shaders/debug.vert \
data/shaders/background.frag \
data/shaders/background.vert \
data/shaders/model.frag \
data/shaders/model.vert
SOURCES += src/core/main.cpp \
src/graphics/DeferredRenderer.cpp \
src/graphics/Shader.cpp \
src/graphics/SpritePool.cpp \
src/graphics/TileMap.cpp \
src/util/Telemetry.cpp \
src/util/Logging.cpp \
src/util/Config.cpp \
src/window/Window.cpp
HEADERS += \
include/util/stb_image.h \
include/graphics/DeferredRenderer.h \
include/graphics/Mesh.h \
include/graphics/Renderable.h \
include/graphics/Shader.h \
include/graphics/SpritePool.h \
include/graphics/TileMap.h \
include/util/Config.h \
include/util/Helpers.h \
include/util/Logging.h \
include/util/Telemetry.h \
include/window/Window.h \
include/graphics/Debug.h \
include/world/Scene.h \
include/math/Types.h \
include/math/AABB.h \
include/physics/Engine.h \
include/ecs/components/TriggerRegion.h \
include/ecs/components/RigidBody.h \
include/ecs/components/Sprite.h \
include/ecs/components/Spawner.h \
include/ecs/components/Behavior.h \
include/ecs/components/Global.h \
include/ecs/components/CharacterController.h \
include/ecs/Loader.h \
include/ecs/components/TimeAware.h \
include/ecs/components/Hierarchy.h \
include/graphics/Model.h \
include/lib.h \
include/ecs/components/AABB.h \
include/ecs/components/Material.h \
include/ecs/components/Mesh.h \
include/ecs/components/Transform.h \
include/ecs/ctors/Transform.h \
include/ecs/ctors/Component.h \
include/ecs/systems/System.h \
include/ecs/systems/sprite_render.h \
include/ecs/components/Labels.h \
include/graphics/Renderer.h \
include/util/Profiling.h \
include/util/Clock.h