aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 87370cf..99b276e 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -796,10 +796,17 @@ namespace backend
#endif
for(const auto &includeDir : config.getIncludeDirs())
{
- string includeDirRelative = "../../../";
- includeDirRelative += includeDir;
globalIncDir += " ";
- globalIncDir += getIncludeOptionFlag(config.getCompiler(), includeDirRelative);
+ if(isPathAbsolute(includeDir))
+ {
+ globalIncDir += getIncludeOptionFlag(config.getCompiler(), includeDir);
+ }
+ else
+ {
+ string includeDirRelative = "../../../";
+ includeDirRelative += includeDir;
+ globalIncDir += getIncludeOptionFlag(config.getCompiler(), includeDirRelative);
+ }
}
auto parentGlobalIncludeDirCallback = globalIncludeDirCallback;