aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja
diff options
context:
space:
mode:
Diffstat (limited to 'backend/ninja')
-rw-r--r--backend/ninja/Ninja.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index e290436..3c2b848 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -215,12 +215,19 @@ namespace backend
string result;
result.reserve(16384);
- string globalLibDir = getHomeDir();
- globalLibDir += "/.sibs/lib";
+ string globalIncDir = getHomeDir();
+ globalIncDir += "/.sibs/lib";
- result += "globalLibDir = '-I";
- result += globalLibDir;
- result += "'\n\n";
+ result += "globalIncDir = '-I";
+ result += globalIncDir;
+ result += "'";
+ for(const auto &includeDir : config.getIncludeDirs())
+ {
+ result += " '-I../../";
+ result += includeDir;
+ result += "'";
+ }
+ result += "\n\n";
string buildJob;
switch(libraryType)
@@ -276,7 +283,7 @@ namespace backend
result += ": cpp_COMPILER ../../";
result += sourceFile;
result += "\n";
- result += " ARGS = $globalLibDir '-I" + config.getPackageName() + "@exe' '-I..' '-fdiagnostics-color=always' '-pipe' '-D_FILE_OFFSET_BITS=64' '-Wall' '-Winvalid-pch' '-Wnon-virtual-dtor' '-O0' '-g'\n\n";
+ result += " ARGS = $globalIncDir '-I" + config.getPackageName() + "@exe' '-I..' '-fdiagnostics-color=always' '-pipe' '-D_FILE_OFFSET_BITS=64' '-Wall' '-Winvalid-pch' '-Wnon-virtual-dtor' '-O0' '-g'\n\n";
objectNames.emplace_back(objectName);
}