aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/ninja/Ninja.cpp11
-rw-r--r--src/Package.cpp2
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);
}