diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-17 02:05:34 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:33 +0200 |
commit | 1abab1fa5e25799a41a1ca76b39a31cda961e6d0 (patch) | |
tree | 595394496f3fcf698a2355f080b918275678e622 /backend | |
parent | c59f08863e5a131e2df6ddc9acd4bd7366ebe6eb (diff) |
Add cflag include headers to parent project
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ninja/Ninja.cpp | 11 |
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); |