You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Dynamically load libpulse.so.0 and libasound.so.1 on Linux
By generating stubs using https://github.com/hpvb/dynload-wrapper we can dynamically load libpulse and libasound on systems where it is available. Both are still a build-time requirement but no longer a run-time dependency. For maintenance purposes the wrappers should not need to be re-generated unless we want to bump pulse or asound to an incompatible version. It is unlikely we will want to do this any time soon. This closes #20978
This commit is contained in:
@@ -310,9 +310,8 @@ def configure(env):
|
||||
|
||||
if os.system("pkg-config --exists alsa") == 0: # 0 means found
|
||||
print("Enabling ALSA")
|
||||
env["alsa"] = True
|
||||
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
|
||||
# Don't parse --cflags, we don't need to add /usr/include/alsa to include path
|
||||
env.ParseConfig("pkg-config alsa --libs")
|
||||
else:
|
||||
print("ALSA libraries not found, disabling driver")
|
||||
|
||||
@@ -320,7 +319,7 @@ def configure(env):
|
||||
if os.system("pkg-config --exists libpulse") == 0: # 0 means found
|
||||
print("Enabling PulseAudio")
|
||||
env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED"])
|
||||
env.ParseConfig("pkg-config --cflags --libs libpulse")
|
||||
env.ParseConfig("pkg-config --cflags libpulse")
|
||||
else:
|
||||
print("PulseAudio development libraries not found, disabling driver")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user