diff options
Diffstat (limited to '')
| -rw-r--r-- | .reuse/dep5 | 4 | ||||
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | CMakeModules/Findgamemode.cmake | 15 | ||||
| -rw-r--r-- | externals/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | externals/gamemode/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | externals/gamemode/gamemode_client.h (renamed from externals/gamemode/include/gamemode_client.h) | 3 | ||||
| -rw-r--r-- | src/common/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 2 |
8 files changed, 29 insertions, 18 deletions
diff --git a/.reuse/dep5 b/.reuse/dep5 index d682fbdba..d98b78087 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 | |||
| @@ -151,3 +151,7 @@ License: GPL-3.0-or-later | |||
| 151 | Files: externals/stb/* | 151 | Files: externals/stb/* |
| 152 | Copyright: Sean Barrett | 152 | Copyright: Sean Barrett |
| 153 | License: MIT | 153 | License: MIT |
| 154 | |||
| 155 | Files: externals/gamemode/* | ||
| 156 | Copyright: Copyright 2017-2019 Feral Interactive | ||
| 157 | License: BSD-3-Clause | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt index 599f7c831..18b8f7967 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -343,6 +343,10 @@ if(ENABLE_OPENSSL) | |||
| 343 | find_package(OpenSSL 1.1.1 REQUIRED) | 343 | find_package(OpenSSL 1.1.1 REQUIRED) |
| 344 | endif() | 344 | endif() |
| 345 | 345 | ||
| 346 | if (UNIX AND NOT APPLE) | ||
| 347 | find_package(gamemode 1.7 MODULE) | ||
| 348 | endif() | ||
| 349 | |||
| 346 | # Please consider this as a stub | 350 | # Please consider this as a stub |
| 347 | if(ENABLE_QT6 AND Qt6_LOCATION) | 351 | if(ENABLE_QT6 AND Qt6_LOCATION) |
| 348 | list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}") | 352 | list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}") |
diff --git a/CMakeModules/Findgamemode.cmake b/CMakeModules/Findgamemode.cmake new file mode 100644 index 000000000..aa2f36683 --- /dev/null +++ b/CMakeModules/Findgamemode.cmake | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # SPDX-FileCopyrightText: 2023 yuzu Emulator Project | ||
| 2 | # SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | find_package(PkgConfig QUIET) | ||
| 5 | pkg_search_module(GAMEMODE QUIET IMPORTED_TARGET gamemode) | ||
| 6 | |||
| 7 | include(FindPackageHandleStandardArgs) | ||
| 8 | find_package_handle_standard_args(gamemode | ||
| 9 | REQUIRED_VARS GAMEMODE_INCLUDEDIR | ||
| 10 | VERSION_VAR GAMEMODE_VERSION | ||
| 11 | ) | ||
| 12 | |||
| 13 | if (gamemode_FOUND AND NOT TARGET gamemode::headers) | ||
| 14 | add_library(gamemode::headers ALIAS PkgConfig::GAMEMODE) | ||
| 15 | endif() | ||
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 04007a538..407c5c640 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt | |||
| @@ -193,8 +193,10 @@ if (ANDROID) | |||
| 193 | endif() | 193 | endif() |
| 194 | endif() | 194 | endif() |
| 195 | 195 | ||
| 196 | if (UNIX AND NOT APPLE) | 196 | if (UNIX AND NOT APPLE AND NOT TARGET gamemode::headers) |
| 197 | add_subdirectory(gamemode) | 197 | add_library(gamemode INTERFACE) |
| 198 | target_include_directories(gamemode INTERFACE gamemode) | ||
| 199 | add_library(gamemode::headers ALIAS gamemode) | ||
| 198 | endif() | 200 | endif() |
| 199 | 201 | ||
| 200 | # Breakpad | 202 | # Breakpad |
diff --git a/externals/gamemode/CMakeLists.txt b/externals/gamemode/CMakeLists.txt deleted file mode 100644 index 87095642e..000000000 --- a/externals/gamemode/CMakeLists.txt +++ /dev/null | |||
| @@ -1,11 +0,0 @@ | |||
| 1 | # SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project | ||
| 2 | # SPDX-License-Identifier: GPL-3.0-or-later | ||
| 3 | |||
| 4 | project(gamemode LANGUAGES CXX C) | ||
| 5 | |||
| 6 | add_library(gamemode include/gamemode_client.h) | ||
| 7 | |||
| 8 | target_link_libraries(gamemode PRIVATE common) | ||
| 9 | |||
| 10 | target_include_directories(gamemode PUBLIC include) | ||
| 11 | set_target_properties(gamemode PROPERTIES LINKER_LANGUAGE C) | ||
diff --git a/externals/gamemode/include/gamemode_client.h b/externals/gamemode/gamemode_client.h index 184812334..b9f64fe46 100644 --- a/externals/gamemode/include/gamemode_client.h +++ b/externals/gamemode/gamemode_client.h | |||
| @@ -1,6 +1,3 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2017-2019 Feral Interactive | ||
| 2 | // SPDX-License-Identifier: BSD-3-Clause | ||
| 3 | |||
| 4 | /* | 1 | /* |
| 5 | 2 | ||
| 6 | Copyright (c) 2017-2019, Feral Interactive | 3 | Copyright (c) 2017-2019, Feral Interactive |
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 2c6fc7657..b58a7073f 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -188,7 +188,7 @@ if (UNIX AND NOT APPLE) | |||
| 188 | linux/gamemode.h | 188 | linux/gamemode.h |
| 189 | ) | 189 | ) |
| 190 | 190 | ||
| 191 | target_link_libraries(common PRIVATE gamemode) | 191 | target_link_libraries(common PRIVATE gamemode::headers) |
| 192 | endif() | 192 | endif() |
| 193 | 193 | ||
| 194 | if(ARCHITECTURE_x86_64) | 194 | if(ARCHITECTURE_x86_64) |
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index f3ad2214b..90278052a 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt | |||
| @@ -386,7 +386,7 @@ if (NOT WIN32) | |||
| 386 | target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}) | 386 | target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}) |
| 387 | endif() | 387 | endif() |
| 388 | if (UNIX AND NOT APPLE) | 388 | if (UNIX AND NOT APPLE) |
| 389 | target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::DBus gamemode) | 389 | target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::DBus) |
| 390 | endif() | 390 | endif() |
| 391 | 391 | ||
| 392 | target_compile_definitions(yuzu PRIVATE | 392 | target_compile_definitions(yuzu PRIVATE |