aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 05bb16d..ac683a0 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -885,7 +885,7 @@ namespace backend
compileCCommand.push_back(ninja::NinjaArg("/w"));
// TODO: Remove this once locate_windows_sdk has been updated to locate multiple arch windows sdk
-#if SYSTEM_PLATFORM == PLATFORM_WIN32
+#ifdef _WIN32
#error "sibs is currently not supported on windows 32-bit because locate_windows_sdk can only locate x64 windows sdk"
#endif
@@ -1088,6 +1088,9 @@ namespace backend
case LibraryType::EXECUTABLE:
{
vector<ninja::NinjaArg> buildExeArgs;
+ string executableName = config.getPackageName();
+ if(OS_FAMILY == OS_FAMILY_WINDOWS)
+ executableName += ".exe";
if(onlyZigFiles)
{
buildExeArgs.insert(buildExeArgs.end(), {
@@ -1102,7 +1105,7 @@ namespace backend
buildExeArgs.insert(buildExeArgs.end(), zigLibraryFlags.begin(), zigLibraryFlags.end());
ninja::NinjaRule *buildExeRule = ninjaBuildFile.createRule("build_exec", buildExeArgs);
- buildExeRule->build(objectNames, OS_FAMILY == OS_FAMILY_POSIX ? config.getPackageName() : config.getPackageName() + ".exe", { zigObjectArgsValue });
+ buildExeRule->build(objectNames, executableName, { zigObjectArgsValue });
}
else
{
@@ -1170,7 +1173,7 @@ namespace backend
buildExeArgs.push_back(ninja::NinjaArg::createRaw(allLinkerFlags));
ninja::NinjaRule *buildExeRule = ninjaBuildFile.createRule("build_exec", buildExeArgs);
- buildExeRule->build(objectNames, config.getPackageName() + ".exe", {});
+ buildExeRule->build(objectNames, executableName, {});
}
projectGeneratedBinary += config.getPackageName();