GetPrerequisites: Include weak macOS dependencies

Starting with Clang 12, `otool -L` adds `, weak` to weakly linked
libraries.  Update GetPrerequisites to recognize these.

Issue: #21684
This commit is contained in:
Bianca van Schaik 2021-01-14 14:28:48 +01:00 committed by Brad King
parent 2c0e4c3762
commit f2d92b983b

View File

@ -735,7 +735,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
set(gp_regex_cmp_count 1)
elseif(gp_tool MATCHES "otool$")
set(gp_cmd_args "-L")
set(gp_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$")
set(gp_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)(, weak)?\\)${eol_char}$")
set(gp_regex_error "")
set(gp_regex_fallback "")
set(gp_regex_cmp_count 3)