Repository navigation
Conversation
In some cases `ZLIB::ZLIB` and/or `OpenSSL::Crypto` may be aliases, which prevents setting a curl-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 curl'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: curl/curl#20316
Member
Author
|
Clarification to the commit message, post-merge: Contrary to what I The fix is still good to make this defensive and protect against projects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some cases
ZLIB::ZLIBand/orOpenSSL::Cryptomay be aliases,which prevents setting a libssh2-specific property (.pc module name)
in them:
This can happen when doing "superbuilds" with classic zlib or zlib-ng,
which define
ZLIB::ZLIBon their own, but as an alias, unlike CMakedoes with the canonical
ZLIB::ZLIBtarget.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
zlibis now present in libssh2.pcwhen 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: curl/curl#20316
Follow-up to df0563a #1535