diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-09-26 01:52:50 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:33 +0200 |
commit | 527179c68597b907dbd6bdc6489181306e9e19ec (patch) | |
tree | 7b90b284b1927edc22b080da7ffe7e5b3620b466 /backend | |
parent | 2bbcfbf4014d332121c65d7480a42556f02d00bc (diff) |
Fix build for linux
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ninja/Ninja.cpp | 9 |
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(); |