cmake hotfix windows

This commit is contained in:
Alex Vanderveen
2026-08-16 17:49:17 -04:00
parent e1bb4ca0dd
commit ae9432a334
3 changed files with 9 additions and 5 deletions
+3 -2
View File
@@ -903,8 +903,9 @@ function(psxrecomp_add_runtime_target target)
target_link_libraries(${target} PRIVATE chdr-static)
# audio_trace.c uses C11 atomics. Make the runtime's actual language
# requirement explicit instead of relying on a parent project's global
# CMAKE_C_STANDARD setting.
target_compile_features(${target} PRIVATE c_std_11)
# CMAKE_C_STANDARD setting. cxx_std_17 likewise — game CMakeLists may omit
# CMAKE_CXX_STANDARD; mod_packages.cpp must not compile as a pre-17 dialect.
target_compile_features(${target} PRIVATE c_std_11 cxx_std_17)
# Game-specific executable name. Every title instantiates this function with
# the same CMake target name ("psx-runtime"), so without this they ALL produce
+5 -2
View File
@@ -1159,8 +1159,11 @@ void read_conditions(const toml::value& value, const std::vector<ModOption>& opt
when[id] = condition_value;
}
}
for (const auto& [id, condition_value] : when) {
(void)condition_value;
/* Bind map entries to real locals before the lambda — capturing a
* structured binding is a C++20 extension and breaks MinGW C++17 builds. */
for (const auto& entry : when) {
const std::string& id = entry.first;
const std::string& condition_value = entry.second;
const auto option = std::find_if(
options.begin(), options.end(),
[&](const ModOption& item) {