add screen saver inhibition

This commit is contained in:
Geoffray Levasseur committed 2026-11-06 18:12:46 +01:00
1 parent e3886af964
commit eec0eb2a4b
4 files changed
+149 -2

No files matched your search

+11 -2
View File
@@ -45,8 +45,12 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
# ai/stdai has no Qt dependency, so only require Qt when building the app.
if(CEVO_WITH_APP)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Multimedia Xml LinguistTools)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Multimedia Xml LinguistTools)
set(CEVO_QT_COMPONENTS Widgets Multimedia Xml LinguistTools)
if(UNIX AND NOT APPLE)
list(APPEND CEVO_QT_COMPONENTS DBus)
endif()
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS ${CEVO_QT_COMPONENTS})
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${CEVO_QT_COMPONENTS})
endif()
include(GNUInstallDirs)
@@ -103,6 +107,8 @@ set(PROJECT_SOURCES
game/GameServer.TurnProcessing.cpp
game/Global.cpp
game/Global.h
game/ScreenSaverInhibitor.cpp
game/ScreenSaverInhibitor.h
game/Inp.cpp
game/Inp.h
game/Inp.ui
@@ -229,6 +235,9 @@ else()
endif()
target_link_libraries(c-evo-evo PRIVATE Qt${QT_VERSION_MAJOR}::Widgets dpiwidgets cevowidgets uosmedia cevocommon cevogame cevoai)
if(UNIX AND NOT APPLE)
target_link_libraries(c-evo-evo PRIVATE Qt${QT_VERSION_MAJOR}::DBus)
endif()
# Lets flat game/ files use simple quoted includes (e.g. "Global.h",
# "localplayer/Tribes.h") regardless of which game/ subdirectory the