]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: avoid setting custom property on built-in interface targets
authorViktor Szakats <commit@vsz.me>
Wed, 14 Jan 2026 12:04:18 +0000 (13:04 +0100)
committerViktor Szakats <commit@vsz.me>
Wed, 14 Jan 2026 19:46:25 +0000 (20:46 +0100)
commit6437bd79ae8c67066728a83ed62edee48e596bdd
tree6269f93e8c8264dff4143f255fb320b61ef43cd4
parent2b12dbc1165a3cb005d0e21fb0340bd69aaf0ffa
cmake: avoid setting custom property on built-in interface targets

In some cases `ZLIB::ZLIB` and/or `OpenSSL::SSL` may be aliases, which
prevents setting a curl-specific property (.pc module name) in them:
```
CMake Error at [...]/curl/CMakeLists.txt:910 (set_target_properties):
  set_target_properties can not be used on an ALIAS 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 curl's internal build logic.

Reported-by: Tomáš Malý
Fixes #20313
Follow-up to 16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973
Closes #20316
CMakeLists.txt