Skip to content

cmake: add librtmp Find module #15832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Dec 26, 2024

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.

@github-actions github-actions bot added the CI Continuous Integration label Dec 26, 2024
@vszakats vszakats changed the title cmake: add Find module for librtmp cmake: add librtmp Find module Dec 26, 2024
@testclutch
Copy link

Analysis of PR #15832 at 0ac5475f:

Test http/test_14_auth.py::TestAuth::test_14_03_digest_put_auth[0-h3] failed, which has NOT been flaky recently, so there could be a real issue in this PR.

Generated by Testclutch

There is version information in rtmp.h (in hex format), but in Homebrew
for example it says 0x020300, while the version is 2.4 in reality.
Thus I didn't make the effort to manually retrieve it.
No longer used after this patch. Also it's probably better to
add these to `CMAKE_REQUIRES_LIBRARIES` from the caller directly
within a push/pop state.
It's required when linking librtmp statically.
@vszakats vszakats closed this in 421e592 Dec 27, 2024
@vszakats vszakats deleted the cm-find-rtmp branch December 27, 2024 11:53
vszakats added a commit that referenced this pull request Jan 9, 2025
vszakats added a commit that referenced this pull request Jan 26, 2025
- add `iphlpapi` library for c-ares.
  Ref: curl/curl-for-win@082d98b

- fix to not add system libs if the dependency was not found.
  librtmp, Rustls, wolfSSL
  Follow-up to 421e592 #15832
  Follow-up to 7bab201 #15193

Closes #16089
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
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 curl#15832
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
- add `iphlpapi` library for c-ares.
  Ref: curl/curl-for-win@082d98b

- fix to not add system libs if the dependency was not found.
  librtmp, Rustls, wolfSSL
  Follow-up to 421e592 curl#15832
  Follow-up to 7bab201 curl#15193

Closes curl#16089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration cmake RTMP
Development

Successfully merging this pull request may close these issues.

2 participants