mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detected
Starting with Clang 12, `otool -l` reports `LC_LOAD_WEAK_DYLIB` instead of `LC_LOAD_DYLIB` for weakly linked libraries. Update the implementation of `file(GET_RUNTIME_DEPENDENCIES)` to recognize these. Fixes: #21684
This commit is contained in:
committed by
Brad King
parent
f2d92b983b
commit
7e615a540e
@@ -44,7 +44,7 @@ bool cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool::GetFileInfo(
|
||||
std::string line;
|
||||
static const cmsys::RegularExpression rpathRegex("^ *cmd LC_RPATH$");
|
||||
static const cmsys::RegularExpression loadDylibRegex(
|
||||
"^ *cmd LC_LOAD_DYLIB$");
|
||||
"^ *cmd LC_LOAD(_WEAK)?_DYLIB$");
|
||||
static const cmsys::RegularExpression pathRegex(
|
||||
"^ *path (.*) \\(offset [0-9]+\\)$");
|
||||
static const cmsys::RegularExpression nameRegex(
|
||||
|
||||
Reference in New Issue
Block a user