Add GameMode support for Linux build (#796)

This commit is contained in:
Nicholas F 2023-05-11 01:19:44 -04:00 committed by GitHub
parent b74ae21953
commit 1bcdb35e42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 467 additions and 1 deletions

View file

@ -76,12 +76,14 @@ endif()
if (UNIX AND NOT APPLE)
option(ENABLE_WAYLAND "Build with Wayland support" ON)
option(ENABLE_FERAL_GAMEMODE "Enables Feral Interactive GameMode Support" ON)
endif()
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
option(ENABLE_VULKAN "Enables the Vulkan backend" ON)
option(ENABLE_DISCORD_RPC "Enables the Discord Rich Presence feature" ON)
# input backends
if (WIN32)
option(ENABLE_XINPUT "Enables the usage of XInput" ON)
@ -127,6 +129,7 @@ if (UNIX AND NOT APPLE)
add_compile_definitions(HAS_WAYLAND)
endif()
find_package(GTK3 REQUIRED)
endif()
if (ENABLE_VULKAN)
@ -143,6 +146,14 @@ if (ENABLE_DISCORD_RPC)
target_include_directories(discord-rpc INTERFACE ./dependencies/discord-rpc/include)
endif()
if(UNIX AND NOT APPLE)
if(ENABLE_FERAL_GAMEMODE)
add_compile_definitions(ENABLE_FERAL_GAMEMODE)
add_subdirectory(dependencies/gamemode EXCLUDE_FROM_ALL)
target_include_directories(gamemode INTERFACE ./dependencies/gamemode/lib)
endif()
endif()
if (ENABLE_WXWIDGETS)
find_package(wxWidgets 3.2 REQUIRED COMPONENTS base core gl propgrid xrc)
endif()