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 | |
parent | c59f08863e5a131e2df6ddc9acd4bd7366ebe6eb (diff) |
Add cflag include headers to parent project
-rw-r--r-- | backend/ninja/Ninja.cpp | 11 | ||||
-rw-r--r-- | src/Package.cpp | 2 |
2 files changed, 11 insertions, 2 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); diff --git a/src/Package.cpp b/src/Package.cpp index 6773265..eab0680 100644 --- a/src/Package.cpp +++ b/src/Package.cpp @@ -174,7 +174,7 @@ namespace sibs errMsg += "\" with version \""; errMsg += packageVersion; errMsg += "\" does not exist or does not exist for platform \""; - errMsg += platform; + errMsg += asString(platform); errMsg += "\""; return Result<string>::Err(errMsg); } |