cmake: add librtmp Find module

The new detection method also allows to enable librtmp without using
OpenSSL as a curl TLS backend at the same time.

Also:
- implement manual version detection for librtmp.
  Version info is in hex. With CMake 3.13 and newer, extract it as a hex
  number. With earlier CMake version, just strip the leading zeroes.
  Doing more here seems overkill because librtmp has been standing
  at 2.3/2.4 for a decade now. Bumping into hex digits seems unlikely
  before deprecating CMake 3.13 support.
  librtmp advertises v2.4 via its `pkg-config` module, and v2.3 via
  its public header. The latter shows up in `curl -V` and either can
  be shown at configure-time depending on detection method.
  This isn't a curl bug.
- GHA/macos: enable rtmp in a job.
- apply the "half-detection" fix to the Find module.
  `librtmp` is also affected (in CI too), because it depends on libssl and
  libcrypto.

Closes #15832
This commit is contained in:
Viktor Szakats 2024-12-26 11:34:24 +01:00
parent 5e1700d167
commit 421e592db2
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 128 additions and 32 deletions

View file

@ -324,6 +324,8 @@ Details via CMake
- `LIBIDN2_LIBRARY`: Path to `libidn2` library.
- `LIBPSL_INCLUDE_DIR`: The libpsl include directory.
- `LIBPSL_LIBRARY`: Path to `libpsl` library.
- `LIBRTMP_INCLUDE_DIR`: The librtmp include directory.
- `LIBRTMP_LIBRARY`: Path to `librtmp` library.
- `LIBSSH_INCLUDE_DIR`: The libssh include directory.
- `LIBSSH_LIBRARY`: Path to `libssh` library.
- `LIBSSH2_INCLUDE_DIR`: The libssh2 include directory.