forked from AndreaCatania/godot_tracy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCsub
35 lines (25 loc) · 1006 Bytes
/
SCsub
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
#!/usr/bin/env python
Import("env")
Import("env_modules")
env_tracy = env_modules.Clone()
tracy_dir = "./tracy/public/"
tracy_src = [
"TracyClient.cpp",
]
tracy_sources = [tracy_dir + file for file in tracy_src]
# Treat headers as system headers to avoid raising warnings. Not supported on MSVC.
if not env.msvc:
env_tracy.Append(CPPFLAGS=["-isystem", Dir(tracy_dir).path])
else:
env_tracy.Prepend(CPPPATH=[tracy_dir])
env_tracy.disable_warnings()
if "tracy_enable" in env and env["tracy_enable"] == "yes":
env_tracy.Append(CPPDEFINES=["TRACY_ENABLE"])
env_modules.Append(CPPDEFINES=["TRACY_ENABLE"])
env.Append(CPPDEFINES=["TRACY_ENABLE"])
if "tracy_on_demand" in env and env["tracy_on_demand"]:
env_tracy.Append(CPPDEFINES=["TRACY_ON_DEMAND"])
env_modules.Append(CPPDEFINES=["TRACY_ON_DEMAND"])
env.Append(CPPDEFINES=["TRACY_ON_DEMAND"])
env_tracy.add_source_files(env.modules_sources, tracy_sources)
env_tracy.add_source_files(env.modules_sources, "*.cpp")