From 9d28d2770216551abb30e785b5ffb2e8bfbfbe89 Mon Sep 17 00:00:00 2001 From: "F. Duncanh" Date: Mon, 11 Aug 2025 14:23:06 -0400 Subject: [PATCH] added support for DBus-based screensaver inhibition --- CMakeLists.txt | 14 ++++ README.html | 28 ++++++- README.md | 26 ++++++- README.txt | 29 +++++++- uxplay.1 | 2 + uxplay.cpp | 193 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 286 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61f6d5e..d797d79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,15 @@ if ( ( UNIX AND NOT APPLE ) OR USE_X11 ) endif() endif() +if( UNIX AND NOT APPLE ) + find_package(PkgConfig REQUIRED) + pkg_check_modules(DBUS dbus-1>=1.4.12) + if (DBUS_FOUND ) + add_definitions(-DDBUS ) + include_directories(${DBUS_INCLUDE_DIRS}) + endif() +endif() + if( UNIX AND NOT APPLE ) add_definitions( -DSUPPRESS_AVAHI_COMPAT_WARNING ) # convert AirPlay colormap 1:3:7:1 to sRGB (1:1:7:1), needed on Linux and BSD @@ -54,6 +63,11 @@ target_link_libraries( uxplay renderers airplay ) +if (DBUS_FOUND) +target_link_libraries( uxplay + ${DBUS_LIBRARIES} + ) +endif() install( TARGETS uxplay RUNTIME DESTINATION bin ) install( FILES uxplay.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) diff --git a/README.html b/README.html index 6aeef12..b98ce60 100644 --- a/README.html +++ b/README.html @@ -8,6 +8,15 @@ developed at the GitHub site https://github.com/FDH2/UxPlay (where ALL user issues should be posted, and latest versions can be found).