diff options
author | Richard Levitte <levitte@openssl.org> | 2023-11-21 13:45:13 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2023-12-02 14:15:25 +0100 |
commit | dd5fe94a61b4455630cbb2988da71949e88f8b6a (patch) | |
tree | 99d2f3ca9cbac9b80959b094dc8db8881d46fbeb /exporters | |
parent | c08b21a2c95c2925e9c7ab11eb667d95e7b1fe3a (diff) | |
download | openssl-dd5fe94a61b4455630cbb2988da71949e88f8b6a.tar.gz |
exporters/cmake/OpenSSLConfig.cmake.in: Detect missing `platform->sharedlib_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 https://github.com/openssl/openssl/pull/22789)
Diffstat (limited to 'exporters')
-rw-r--r-- | exporters/cmake/OpenSSLConfig.cmake.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/exporters/cmake/OpenSSLConfig.cmake.in b/exporters/cmake/OpenSSLConfig.cmake.in index 606773ff27..2d2321931d 100644 --- a/exporters/cmake/OpenSSLConfig.cmake.in +++ b/exporters/cmake/OpenSSLConfig.cmake.in @@ -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}} |