1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Load fontconfig libraries dynamically.

This commit is contained in:
bruvzg
2022-07-27 21:07:21 +03:00
parent abb44676e0
commit 9ced8bcca3
6 changed files with 3148 additions and 6 deletions

View File

@@ -41,6 +41,7 @@ def get_opts():
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
BoolVariable("dbus", "Detect and use D-Bus to handle screensaver", True),
BoolVariable("speechd", "Detect and use Speech Dispatcher for Text-to-Speech support", True),
BoolVariable("fontconfig", "Detect and use fontconfig for system fonts support", True),
BoolVariable("udev", "Use udev for gamepad connection callbacks", True),
BoolVariable("x11", "Enable X11 display", True),
BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
@@ -298,11 +299,13 @@ def configure(env):
## Flags
if os.system("pkg-config --exists fontconfig") == 0: # 0 means found
env.Append(CPPDEFINES=["FONTCONFIG_ENABLED"])
env.ParseConfig("pkg-config fontconfig --cflags --libs")
else:
print("Warning: fontconfig libraries not found. Disabling the system fonts support.")
if env["fontconfig"]:
if os.system("pkg-config --exists fontconfig") == 0: # 0 means found
env.Append(CPPDEFINES=["FONTCONFIG_ENABLED"])
env.ParseConfig("pkg-config fontconfig --cflags") # Only cflags, we dlopen the library.
else:
env["fontconfig"] = False
print("Warning: fontconfig libraries not found. Disabling the system fonts support.")
if os.system("pkg-config --exists alsa") == 0: # 0 means found
env["alsa"] = True