-
Notifications
You must be signed in to change notification settings - Fork 8
/
SConstruct
36 lines (27 loc) · 1.17 KB
/
SConstruct
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
#!/usr/bin/env python
env = SConscript("src/lib/godot-cpp/SConstruct")
env.Append(CPPPATH=["src/"])
if env.get("CC", "").lower() == "cl":
# Building with MSVC
env.AppendUnique(CCFLAGS=("/I", "src/lib/steamaudio/unity/include/phonon/"))
else:
env.AppendUnique(CCFLAGS=("-isystem", "src/lib/steamaudio/unity/include/phonon/"))
sources = Glob("src/*.cpp")
steam_audio_lib_path = env.get("STEAM_AUDIO_LIB_PATH", "src/lib/steamaudio/lib")
if env["platform"] == "linux":
env.Append(LIBPATH=[f'{steam_audio_lib_path}/linux-x64'])
env.Append(LIBS=["libphonon.so"])
elif env["platform"] == "windows":
env.Append(LIBPATH=[f'{steam_audio_lib_path}/windows-x64'])
env.Append(LIBS=["phonon"])
elif env["platform"] == "macos":
env.Append(LIBPATH=[f'{steam_audio_lib_path}/osx'])
env.Append(LIBS=["libphonon.dylib"])
if env["target"] in ["editor", "template_debug"]:
doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("doc_classes/*.xml"))
sources.append(doc_data)
library = env.SharedLibrary(
"project/addons/godot-steam-audio/bin/godot-steam-audio{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),
source=sources,
)
Default(library)