diff options
author | dec05eba <dec05eba@protonmail.com> | 2017-12-31 09:00:35 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2017-12-31 09:01:11 +0100 |
commit | d2903699b4b5a748bfdefa5eaf942bb1b2c7a68a (patch) | |
tree | ea18ba24f15028ea62ecc1b666eda8b4e863314e /backend/ninja | |
parent | d128790d6b9aa7809461eecd3d3e05cc1744742b (diff) |
Add missing defines (WIN32, WIN64), fix static lib name on windows
Diffstat (limited to 'backend/ninja')
-rw-r--r-- | backend/ninja/Ninja.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index db7394a..aec3216 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -438,6 +438,15 @@ namespace backend defines += getDefineFlag(config.getCompiler(), definePair.first, definePair.second); } + switch (SYSTEM_PLATFORM) + { + case PLATFORM_WIN64: + defines += " /DWIN64 /D_WIN64"; + case PLATFORM_WIN32: + defines += " /DWIN32 /D_WIN32"; + break; + } + if(!defines.empty()) printf("Custom define: %s\n", defines.c_str()); @@ -655,21 +664,25 @@ namespace backend } case LibraryType::STATIC: { - result += "build "; - result += config.getPackageName(); - result += ": " + buildJob + " "; - result += join(objectNames, " "); - result += "\n\n"; - switch (config.getCompiler()) { case Compiler::GCC: { + result += "build lib"; + result += config.getPackageName(); + result += ".a: " + buildJob + " "; + result += join(objectNames, " "); + result += "\n\n"; projectGeneratedBinary += config.getPackageName() + ".a"; break; } case Compiler::MSVC: { + result += "build "; + result += config.getPackageName(); + result += ".lib: " + buildJob + " "; + result += join(objectNames, " "); + result += "\n\n"; projectGeneratedBinary += config.getPackageName() + ".lib"; break; } |