1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-01-27 00:18:12 +03:00
Viktor Szakats bd1d00a4b3 cmake: avoid setting custom property on built-in interface targets
In some cases `ZLIB::ZLIB` and/or `OpenSSL::Crypto` may be aliases,
which prevents setting a libssh2-specific property (.pc module name)
in them:
```
CMake Error at [...]/src/CMakeLists.txt:... (set_target_properties):
  set_target_properties can not be used on an ALIAS target.
```

This can happen when doing "superbuilds" with classic zlib or zlib-ng,
which define `ZLIB::ZLIB` on their own, but as an alias, unlike CMake
does with the canonical `ZLIB::ZLIB` target.

Fix by special-casing these built-in targets and manually converting
them to .pc module names, without using the targets themselves
to carry this information throughout libssh2's internal build logic.

A side-effect of this change is that `zlib` is now present in libssh2.pc
when zlib is an indirect dependency via a crypto backend (OpenSSL or
wolfSSL). Before this patch it only appeared there when enabling zlib
explicitly for libssh2.

Ref: https://github.com/curl/curl/pull/20316
Follow-up to df0563a857 #1535

Closes #1789
2026-01-14 21:28:25 +01:00
2025-12-26 21:22:11 +01:00
2025-12-26 00:38:59 +01:00
2025-12-26 00:38:59 +01:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-08-18 11:20:58 +00:00
2011-04-04 13:31:33 +02:00
2023-08-18 11:20:58 +00:00

libssh2 - SSH2 library

libssh2 is a library implementing the SSH2 protocol, available under the revised BSD license.

Web site

Mailing list

BSD Licensed

Web site source code

Installation instructions:

Description
libssh2 - это библиотека, реализующая протокол SSH2, доступная по пересмотренной лицензии BSD
Readme 18 MiB
Languages
C 84.8%
M4 3.6%
CMake 3.5%
Shell 2.6%
Perl 1.9%
Other 3.3%