trantor: use requires explicitly to avoid issues with openssl #27510
+7
−0
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.
Summary
Changes to recipe: trantor/[version]
Motivation
In some cases (e.g. cross-compilation), if openSSL is not present, the cmake target is incorrectly communicated as having the alias openssl::openssl. This change makes sure that the correct openSSL names are propagated to the consumers. I had already posted an issue #27497 .
Details
When cross-compiling as a consumer of the library there can be issues with openSSL being correctly detected through its targets. When I tried cross compiling drogon that depends on trantor, I got an error on CMake which basically said that
openssl::openssl
is not a declared target.When not cross-compiling that worked fine. That's most likely because my native (x64) configuration had openSSL installed while the cross-compiled host config did not.
The change explicitly sets the names of the dependencies so that the conan-generated
openssl::openssl
is avoided. This of course means that all the requirements must be explicitly set inpackage_info()
.