diff --git a/cmake/dependencies/Boost_Sunshine.cmake b/cmake/dependencies/Boost_Sunshine.cmake index 72ab5443..dc13bb0e 100644 --- a/cmake/dependencies/Boost_Sunshine.cmake +++ b/cmake/dependencies/Boost_Sunshine.cmake @@ -15,14 +15,19 @@ if(BOOST_USE_STATIC) set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103 endif() +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30") + cmake_policy(SET CMP0167 NEW) # Get BoostConfig.cmake from upstream +endif() find_package(Boost CONFIG ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS}) if(NOT Boost_FOUND) message(STATUS "Boost v${BOOST_VERSION}.x package not found in the system. Falling back to FetchContent.") include(FetchContent) - # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") - cmake_policy(SET CMP0135 NEW) + cmake_policy(SET CMP0135 NEW) # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24 + endif() + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0") + cmake_policy(SET CMP0174 NEW) # Handle empty variables endif() # more components required for compiling boost targets diff --git a/cmake/dependencies/nlohmann_json.cmake b/cmake/dependencies/nlohmann_json.cmake index c0029b42..11000c8d 100644 --- a/cmake/dependencies/nlohmann_json.cmake +++ b/cmake/dependencies/nlohmann_json.cmake @@ -8,6 +8,13 @@ if(NOT nlohmann_json_FOUND) message(STATUS "nlohmann_json v3.11.x package not found in the system. Falling back to FetchContent.") include(FetchContent) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") + cmake_policy(SET CMP0135 NEW) # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24 + endif() + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0") + cmake_policy(SET CMP0174 NEW) # Handle empty variables + endif() + FetchContent_Declare( json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz diff --git a/src/config.h b/src/config.h index d15f773e..8ecfcbe2 100644 --- a/src/config.h +++ b/src/config.h @@ -16,6 +16,9 @@ #include "nvenc/nvenc_config.h" namespace config { + // track modified config options + inline std::unordered_map modified_config_settings; + struct video_t { bool headless_mode; bool limit_framerate; diff --git a/src/main.cpp b/src/main.cpp index de37ad80..079c2c3a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -108,6 +108,11 @@ int main(int argc, char *argv[]) { mail::man = std::make_shared(); + // parse config file + if (config::parse(argc, argv)) { + return 0; + } + auto log_deinit_guard = logging::init(config::sunshine.min_log_level, config::sunshine.log_file); if (!log_deinit_guard) { BOOST_LOG(error) << "Logging failed to initialize"sv; @@ -121,10 +126,11 @@ int main(int argc, char *argv[]) { // Log publisher metadata log_publisher_data(); - // parse config file - if (config::parse(argc, argv)) { - return 0; + // Log modified_config_settings + for (auto &[name, val] : config::modified_config_settings) { + BOOST_LOG(info) << "config: '"sv << name << "' = "sv << val; } + config::modified_config_settings.clear(); if (!config::sunshine.cmd.name.empty()) { auto fn = cmd_to_func.find(config::sunshine.cmd.name); diff --git a/third-party/Simple-Web-Server b/third-party/Simple-Web-Server index ab36f157..5b29c700 160000 --- a/third-party/Simple-Web-Server +++ b/third-party/Simple-Web-Server @@ -1 +1 @@ -Subproject commit ab36f1576bdc05ec0c017a74c4edd7f48109b302 +Subproject commit 5b29c7004cc53252a8eff06d62899c8847ada971 diff --git a/third-party/wayland-protocols b/third-party/wayland-protocols index c7b582cb..4313a51a 160000 --- a/third-party/wayland-protocols +++ b/third-party/wayland-protocols @@ -1 +1 @@ -Subproject commit c7b582cb71ec145026a547dcd8abb9dfeba40541 +Subproject commit 4313a51a170efffece8f60f7a5dfdad135e6befa diff --git a/third-party/wlr-protocols b/third-party/wlr-protocols index ffb89ac7..2ec67ebd 160000 --- a/third-party/wlr-protocols +++ b/third-party/wlr-protocols @@ -1 +1 @@ -Subproject commit ffb89ac790096f6e6272822c8d5df7d0cc6fcdfa +Subproject commit 2ec67ebd26b73bada12f3fa6afdd51563b656722 diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index de67f0bc..8d4c08e3 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.20) project(sunshine_tools)