Commit graph

15 commits

Author SHA1 Message Date
Viktor Szakats
0edc16e922
drop VERSION property for cmake <3.19 compatibility
```
-- Found Libpsl: /usr/local/include (found version "0.21.5")
CMake Error at CMake/FindLibpsl.cmake:90 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "VERSION" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:1252 (find_package)
```
2025-11-28 16:19:13 +01:00
Viktor Szakats
4ea7e28d45
find step 7 uppercase VERSION and a fixup 2025-11-28 16:19:13 +01:00
Viktor Szakats
a66c669bb6
find step 5 iface 3 2025-11-28 16:19:12 +01:00
Viktor Szakats
263c0792bc
find step 5 iface 2 2025-11-28 16:19:12 +01:00
Viktor Szakats
5ed54728d3
find step 5 iface 1 2025-11-28 16:19:12 +01:00
Viktor Szakats
c193266e59
find step 4 pkg-config readd uppercase FOUND 2025-11-28 16:19:12 +01:00
Viktor Szakats
f3b4210057
find step 4 pkg-config results renames 2025-11-28 16:19:12 +01:00
Viktor Szakats
f120c50850
find step 4 requires rename 2025-11-28 16:19:12 +01:00
Viktor Szakats
57a1b47f99
find step 3 2025-11-28 16:19:12 +01:00
Viktor Szakats
371c3f6e0e
find step 2 2025-11-28 16:19:12 +01:00
Viktor Szakats
fbf6079834
find step 1 2025-11-28 16:19:12 +01:00
Viktor Szakats
38c19edd67
cmake: say 'absolute path' in option descriptions and docs
To not have to guess. Also to sync with autotools, which already uses
this wording.

Also:
- replace the stray term 'folder' with 'directory' for consistency.
- store help text in a temp variable to avoid overly long strings
  (mandatory in CMake <4.2.0 and can't be trivially split), also
  to avoid repeating this string 4 times.

Ref: https://cmake.org/cmake/help/v4.2/command/set.html

Closes #19169
2025-10-21 15:07:36 +02:00
Viktor Szakats
2b9b3ec579
cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config
For Find modules where `<Modulename>` is not fully uppercase.

`<Modulename>` is case-exact name used in the Find modules filename:
`CMake/Find<Moduleame>.cmake`.

`find_package_handle_standard_args()` sets both `<MODULENAME>_FOUND` and
`<Modulename>_FOUND` when detecting the dependency. Some CMake code
relies on this and 3rd-party code may rely on it too. Make sure to set
the latter variant when detecting the dependency via `pkg-config`, where
we don't call `find_package_handle_standard_args()`.

CMake sets these variable to `TRUE` (not `ON` or `1`). Replicate this
for compatibility.

Closes #16153
2025-02-07 00:07:38 +01:00
Viktor Szakats
3e552ef833
cmake/Find: add iphlpapi for c-ares, omit syslibs if dep not found
- add `iphlpapi` library for c-ares.
  Ref: 082d98ba6b

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

Closes #16089
2025-01-26 01:52:47 +01:00
Viktor Szakats
421e592db2
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
2024-12-27 12:52:23 +01:00