summaryrefslogtreecommitdiffstats
path: root/Source/cmBinUtilsMacOSMachOLinker.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-04-23 15:19:11 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-06-04 12:52:01 (GMT)
commit2ef3ea394f424bf2397878b00725b93ebe04c589 (patch)
tree8af040cd82162771cda213033da055d7fa2829e0 /Source/cmBinUtilsMacOSMachOLinker.cxx
parentb613e09778260c26c6323026dc2ccb980c102f3e (diff)
downloadCMake-2ef3ea394f424bf2397878b00725b93ebe04c589.zip
CMake-2ef3ea394f424bf2397878b00725b93ebe04c589.tar.gz
CMake-2ef3ea394f424bf2397878b00725b93ebe04c589.tar.bz2
file(GET_RUNTIME_DEPENDENCIES): Add undocumented RPATH_PREFIX option
Diffstat (limited to 'Source/cmBinUtilsMacOSMachOLinker.cxx')
-rw-r--r--Source/cmBinUtilsMacOSMachOLinker.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/Source/cmBinUtilsMacOSMachOLinker.cxx b/Source/cmBinUtilsMacOSMachOLinker.cxx
index 0f47146..47f77d8 100644
--- a/Source/cmBinUtilsMacOSMachOLinker.cxx
+++ b/Source/cmBinUtilsMacOSMachOLinker.cxx
@@ -65,18 +65,18 @@ bool cmBinUtilsMacOSMachOLinker::ScanDependencies(
if (!executableFile.empty()) {
executablePath = cmSystemTools::GetFilenamePath(executableFile);
}
- return this->ScanDependencies(file, executablePath);
-}
-
-bool cmBinUtilsMacOSMachOLinker::ScanDependencies(
- std::string const& file, std::string const& executablePath)
-{
std::vector<std::string> libs;
std::vector<std::string> rpaths;
if (!this->Tool->GetFileInfo(file, libs, rpaths)) {
return false;
}
+ return this->ScanDependencies(file, libs, rpaths, executablePath);
+}
+bool cmBinUtilsMacOSMachOLinker::ScanDependencies(
+ std::string const& file, std::vector<std::string> const& libs,
+ std::vector<std::string> const& rpaths, std::string const& executablePath)
+{
std::string loaderPath = cmSystemTools::GetFilenamePath(file);
return this->GetFileDependencies(libs, executablePath, loaderPath, rpaths);
}
@@ -98,8 +98,14 @@ bool cmBinUtilsMacOSMachOLinker::GetFileDependencies(
!IsMissingSystemDylib(path)) {
auto filename = cmSystemTools::GetFilenameName(path);
bool unique;
- this->Archive->AddResolvedPath(filename, path, unique);
- if (unique && !this->ScanDependencies(path, executablePath)) {
+ std::vector<std::string> libs;
+ std::vector<std::string> depRpaths;
+ if (!this->Tool->GetFileInfo(path, libs, depRpaths)) {
+ return false;
+ }
+ this->Archive->AddResolvedPath(filename, path, unique, depRpaths);
+ if (unique &&
+ !this->ScanDependencies(path, libs, depRpaths, executablePath)) {
return false;
}
}