From 538ec5419dec083b3299f8f6c30d492f20e71ed5 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Mon, 2 Mar 2026 21:18:11 +0100 Subject: [PATCH] windows fix --- implementations/Crafter.Build-Project.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/implementations/Crafter.Build-Project.cpp b/implementations/Crafter.Build-Project.cpp index f639de8..1ef37a1 100644 --- a/implementations/Crafter.Build-Project.cpp +++ b/implementations/Crafter.Build-Project.cpp @@ -251,6 +251,8 @@ namespace Crafter { command += std::format(" --sysroot={} -fno-exceptions -fno-c++-static-destructors", (exeDir/"wasi-sysroot-28.0").string()); } + + for(const Define& define : config.defines) { if(define.value.empty()) { command += std::format(" -D {}", define.name); @@ -277,6 +279,10 @@ namespace Crafter { pcmDir = buildDir; } + #if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32) + command += "-D _CRT_SECURE_NO_WARNINGS" + #endif + command += std::format(" -fprebuilt-module-path={}", pcmDir.string()); std::string cmakeBuildType;