From d2903699b4b5a748bfdefa5eaf942bb1b2c7a68a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 31 Dec 2017 09:00:35 +0100 Subject: Add missing defines (WIN32, WIN64), fix static lib name on windows --- backend/ninja/Ninja.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'backend/ninja') 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; } -- cgit v1.2.3