aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja
diff options
context:
space:
mode:
Diffstat (limited to 'backend/ninja')
-rw-r--r--backend/ninja/Ninja.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 4202a82..5df859a 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -843,7 +843,7 @@ namespace backend
}
string dependencyExportIncludeDirs = customGlobalIncludeDirs;
- globalIncludeDirCallback = [&parentGlobalIncludeDirCallback, &globalIncludeDirCallback, &dependencyExportIncludeDirs, &config](const string &globalIncludeDir)
+ globalIncludeDirCallback = [&parentGlobalIncludeDirCallback, &dependencyExportIncludeDirs, &config](const string &globalIncludeDir)
{
dependencyExportIncludeDirs += " ";
dependencyExportIncludeDirs += getIncludeOptionFlag(config.getCompiler(), globalIncludeDir);
@@ -913,6 +913,15 @@ namespace backend
allLinkerFlags += *it;
}
+ if(parentGlobalIncludeDirCallback)
+ {
+ vector<ninja::NinjaArg> cflagIncludes = extractIncludesFromCFlags(config.getCompiler(), cflags);
+ for(const ninja::NinjaArg &include : cflagIncludes)
+ {
+ parentGlobalIncludeDirCallback(include.arg);
+ }
+ }
+
globalIncDir += dependencyExportIncludeDirs;
globalIncDir += " " + getIncludeOptionFlag(config.getCompiler(), toUtf8(generatedHeadersDir));
ninjaBuildFile.defineGlobalVariable("globalIncDir", globalIncDir);