diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-03-28 07:15:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:58 +0200 |
commit | c6e8fe8125f8900f3019716aa1cfbf18ff8264bd (patch) | |
tree | 8eefe81c1cffe59cf6aeea75741f6f92c3edcb40 /backend/ninja | |
parent | 615093ac7f3f647855b60b3a65352140bc44b378 (diff) |
Add support for absolute paths in include_dirs config
Diffstat (limited to 'backend/ninja')
-rw-r--r-- | backend/ninja/Ninja.cpp | 13 |
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; |