aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-09-26 01:52:50 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit527179c68597b907dbd6bdc6489181306e9e19ec (patch)
tree7b90b284b1927edc22b080da7ffe7e5b3620b466 /backend/ninja
parent2bbcfbf4014d332121c65d7480a42556f02d00bc (diff)
Fix build for linux
Diffstat (limited to 'backend/ninja')
-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();