summaryrefslogtreecommitdiffstats
path: root/Source/cmFindCommon.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindCommon.cxx')
-rw-r--r--Source/cmFindCommon.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index 110195c..5d46674 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -154,10 +154,16 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
}
const char* sysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT");
+ const char* sysrootCompile =
+ this->Makefile->GetDefinition("CMAKE_SYSROOT_COMPILE");
+ const char* sysrootLink =
+ this->Makefile->GetDefinition("CMAKE_SYSROOT_LINK");
const char* rootPath = this->Makefile->GetDefinition("CMAKE_FIND_ROOT_PATH");
const bool noSysroot = !sysroot || !*sysroot;
+ const bool noCompileSysroot = !sysrootCompile || !*sysrootCompile;
+ const bool noLinkSysroot = !sysrootLink || !*sysrootLink;
const bool noRootPath = !rootPath || !*rootPath;
- if (noSysroot && noRootPath) {
+ if (noSysroot && noCompileSysroot && noLinkSysroot && noRootPath) {
return;
}
@@ -166,6 +172,12 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
if (rootPath) {
cmSystemTools::ExpandListArgument(rootPath, roots);
}
+ if (sysrootCompile) {
+ roots.push_back(sysrootCompile);
+ }
+ if (sysrootLink) {
+ roots.push_back(sysrootLink);
+ }
if (sysroot) {
roots.push_back(sysroot);
}