From 23df8b9d1f938e814173f9202c670a304953e307 Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Wed, 29 May 2024 21:13:21 -0300 Subject: [PATCH] chore: test fedora fix --- cmake/compile_definitions/linux.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/compile_definitions/linux.cmake b/cmake/compile_definitions/linux.cmake index 7ad9dcc83df..edab5dcbf92 100644 --- a/cmake/compile_definitions/linux.cmake +++ b/cmake/compile_definitions/linux.cmake @@ -230,11 +230,20 @@ if (${SUNSHINE_TRAY} EQUAL 0 AND SUNSHINE_REQUIRE_TRAY) message(FATAL_ERROR "Tray icon is required") endif() +# Function to enforce a specific C++ standard on all targets in a given subdirectory +function(enforce_cpp_standard target_dir cpp_standard) + set_property(DIRECTORY ${target_dir} PROPERTY CXX_STANDARD ${cpp_standard}) + set_property(DIRECTORY ${target_dir} PROPERTY CXX_STANDARD_REQUIRED ON) + set_property(DIRECTORY ${target_dir} PROPERTY CXX_EXTENSIONS OFF) +endfunction() + if(${SUNSHINE_USE_LEGACY_INPUT}) list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/input/legacy_input.cpp") else() add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/inputtino/") + enforce_cpp_standard("${CMAKE_SOURCE_DIR}/third-party/inputtino/" 17) list(APPEND SUNSHINE_EXTERNAL_LIBRARIES inputtino::libinputtino) + list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino_common.h" "${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino_gamepad.h"