Skip to content

Commit

Permalink
exporters/cmake/OpenSSLConfig.cmake.in: Detect missing `platform->sha…
Browse files Browse the repository at this point in the history
…redlib_import`

Some platform implementations are without `sharedlib_import()`, so we need
to check that it exists before using it.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from #22789)
  • Loading branch information
levitte committed Dec 2, 2023
1 parent c08b21a commit dd5fe94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exporters/cmake/OpenSSLConfig.cmake.in
Expand Up @@ -12,10 +12,12 @@
? platform->sharedlib_simple($_)
: undef)
// platform->sharedlib($_);
my $lib_shared_import = platform->sharedlib_import($_);
$x{static} = $lib_static if $lib_static;
$x{shared} = $lib_shared if $lib_shared;
$x{shared_import} = $lib_shared_import if $lib_shared_import;
if (platform->can("sharedlib_import")) {
my $lib_shared_import = platform->sharedlib_import($_);
$x{shared_import} = $lib_shared_import if $lib_shared_import;
}
%x ? ( $_ => \%x ) : () }
grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
@{$unified_info{libraries}}
Expand Down

0 comments on commit dd5fe94

Please sign in to comment.