11#!/usr/bin/env python
2+ import os
3+
4+ godot_cpp_path = "src/lib/godot-cpp"
5+ steam_audio_path = "src/lib/steamaudio"
6+ if (not (os .path .isdir (godot_cpp_path ) and os .listdir (godot_cpp_path ))) or (not (os .path .isdir (steam_audio_path ) and os .listdir (steam_audio_path ))):
7+ print ("""Git submodule dependencies are missing.
8+ Run the following command to install them:
9+ git submodule update --init --recursive""" )
10+ Exit (1 )
211
312env = SConscript ("src/lib/godot-cpp/SConstruct" )
413
14+ steam_audio_lib_path = env .get ("STEAM_AUDIO_LIB_PATH" , "src/lib/steamaudio/lib" )
15+ if not (os .path .isdir (steam_audio_lib_path ) and os .listdir (steam_audio_lib_path )):
16+ print ("""No valid Steam Audio library path was found.
17+ Run the following command to install the latest release:
18+ make install-steam-audio""" )
19+ Exit (1 )
20+
521env .Append (CPPPATH = ["src/" ])
622
723if env .get ("CC" , "" ).lower () == "cl" :
@@ -12,38 +28,31 @@ else:
1228
1329sources = Glob ("src/*.cpp" )
1430
15- steam_audio_lib_path = env .get ( "STEAM_AUDIO_LIB_PATH" , "src/lib/steamaudio/lib" )
31+ env .Append ( LIBS = [ "phonon" ] )
1632
1733if env ["platform" ] == "linux" :
1834 env .Append (LIBPATH = [f'{ steam_audio_lib_path } /linux-x64' ])
19- env .Append (LIBS = ["libphonon.so" ])
2035 env .Append (LINKFLAGS = ["-Wl,--version-script={}" .format (env .File ("linux_symbols.map" ).abspath )])
2136elif env ["platform" ] == "windows" :
2237 env .Append (LIBPATH = [f'{ steam_audio_lib_path } /windows-x64' ])
23- env .Append (LIBS = ["phonon" ])
2438elif env ["platform" ] == "macos" :
2539 env .Append (LIBPATH = [f'{ steam_audio_lib_path } /osx' ])
26- env .Append (LIBS = ["libphonon.dylib" ])
2740elif env ["platform" ] == "android" :
2841 if env ["arch" ] == "arm64" :
2942 env .Append (LIBPATH = [f'{ steam_audio_lib_path } /android-armv8' ])
30- env .Append (LIBS = ["libphonon.so" ])
3143 if env ["arch" ] == "arm32" :
3244 env .Append (LIBPATH = [f'{ steam_audio_lib_path } /android-armv7' ])
33- env .Append (LIBS = ["libphonon.so" ])
3445 if env ["arch" ] == "x86_64" :
3546 env .Append (LIBPATH = [f'{ steam_audio_lib_path } /android-x64' ])
36- env .Append (LIBS = ["libphonon.so" ])
3747 if env ["arch" ] == "x86_32" :
3848 env .Append (LIBPATH = [f'{ steam_audio_lib_path } /android-x32' ])
39- env .Append (LIBS = ["libphonon.so" ])
4049
4150if env ["target" ] in ["editor" , "template_debug" ]:
4251 doc_data = env .GodotCPPDocData ("src/gen/doc_data.gen.cpp" , source = Glob ("doc_classes/*.xml" ))
4352 sources .append (doc_data )
4453
4554library = env .SharedLibrary (
46- "project/addons/godot-steam-audio/bin/godot -steam-audio{}{}" .format (env ["suffix" ], env ["SHLIBSUFFIX" ]),
55+ "project/addons/godot-steam-audio/bin/libgodot -steam-audio{}{}" .format (env ["suffix" ], env ["SHLIBSUFFIX" ]),
4756 source = sources ,
4857)
4958
0 commit comments