windows build fixes
Some checks failed
demo.yaml / windows build fixes (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2026-03-01 15:06:36 +01:00
commit 223d1fd550

View file

@ -322,10 +322,7 @@ namespace Crafter {
std::vector<std::thread> depThreads = std::vector<std::thread>(config.dependencies.size());
std::mutex libMutex;
std::string files;
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu)
std::string libsString;
#endif
std::vector<std::string> resultsDep(config.dependencies.size());
@ -434,7 +431,14 @@ namespace Crafter {
command += " -L/usr/local/lib";
}
if(config.type != CRAFTER_CONFIGURATION_TYPE_LIBRARY) {
#ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu
command += libsString;
#endif
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32)
files += libsString;
#endif
}
#ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu
for(const std::string& lib : config.libs) {
@ -468,7 +472,7 @@ namespace Crafter {
libPath += std::format(" /LIBPATH:{}", lib);
}
buildResult.errors = RunCommand(std::format("link {} {} .\\build\\std.o msvcrt.lib kernel32.lib user32.lib /OUT:{}.exe", lib, files, (binDir/outputName).string()));
buildResult.errors = RunCommand(std::format("link {} {} .\\build\\std.o msvcrt.lib kernel32.lib user32.lib /OUT:{}.exe", libPath, files, (binDir/outputName).string()));
#endif
} else if(config.type == CRAFTER_CONFIGURATION_TYPE_LIBRARY) {
#ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu