summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/detect.py
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-27 19:33:23 +0200
committerGitHub <noreply@github.com>2021-06-27 19:33:23 +0200
commita738ddb9a40ed829d64b380f95ecb6cbf30004c2 (patch)
tree5e4171ff8371585f5d4ed073f8e87b1f71ef662e /platform/linuxbsd/detect.py
parent92f75046378a63b46946e8acbd7c224f027ebfa5 (diff)
parent0c83a23ab51126eb3bbec40d58c7a29a1454ede6 (diff)
Merge pull request #35536 from shroudedcode/keep-screen-on-linux
Make "Keep screen on" work on Linux
Diffstat (limited to 'platform/linuxbsd/detect.py')
-rw-r--r--platform/linuxbsd/detect.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 1487210174..eba672ddcb 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -72,6 +72,7 @@ def get_opts():
BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN)", False),
BoolVariable("use_msan", "Use LLVM compiler memory sanitizer (MSAN)", False),
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
+ BoolVariable("dbus", "Detect and use D-Bus to handle screensaver", 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),
@@ -347,6 +348,14 @@ def configure(env):
else:
print("PulseAudio development libraries not found, disabling driver")
+ if env["dbus"]:
+ if os.system("pkg-config --exists dbus-1") == 0: # 0 means found
+ print("Enabling D-Bus")
+ env.Append(CPPDEFINES=["DBUS_ENABLED"])
+ env.ParseConfig("pkg-config --cflags --libs dbus-1")
+ else:
+ print("D-Bus development libraries not found, disabling dependent features")
+
if platform.system() == "Linux":
env.Append(CPPDEFINES=["JOYDEV_ENABLED"])
if env["udev"]: