diff options
author | Brad King <brad.king@kitware.com> | 2020-01-28 15:56:34 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-28 15:56:41 (GMT) |
commit | 571205fb6b661e33937637133157445fbbe3f510 (patch) | |
tree | 6ce45fb1d4cc2711e9f1e2a1cb577d4c9093138f /Source | |
parent | 1f9321c68399c8cc37a2cb9c78ef45949412bd7b (diff) | |
parent | 32a6ab1f3b23b816881d02cca29afcec280408d4 (diff) | |
download | CMake-571205fb6b661e33937637133157445fbbe3f510.zip CMake-571205fb6b661e33937637133157445fbbe3f510.tar.gz CMake-571205fb6b661e33937637133157445fbbe3f510.tar.bz2 |
Merge topic 'QNX_CMAKE_SYSROOT'
32a6ab1f3b QNX: Add support for CMAKE_SYSROOT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4277
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSearchPath.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx index d15ce57..766d347 100644 --- a/Source/cmSearchPath.cxx +++ b/Source/cmSearchPath.cxx @@ -181,7 +181,13 @@ void cmSearchPath::AddPrefixPaths(const std::vector<std::string>& paths, const char* arch = this->FC->Makefile->GetDefinition("CMAKE_LIBRARY_ARCHITECTURE"); if (arch && *arch) { - this->AddPathInternal(dir + subdir + "/" + arch, base); + if (this->FC->Makefile->IsDefinitionSet("CMAKE_SYSROOT") && + this->FC->Makefile->IsDefinitionSet( + "CMAKE_PREFIX_LIBRARY_ARCHITECTURE")) { + this->AddPathInternal(cmStrCat('/', arch, dir, subdir), base); + } else { + this->AddPathInternal(cmStrCat(dir, subdir, '/', arch), base); + } } } std::string add = dir + subdir; |