-
Notifications
You must be signed in to change notification settings - Fork 36
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
protobuf: library targets have different names under Windows and Linux #429
Comments
@sigiesec have you tried to use |
Yes, but CONAN_PKG::protobuf also depends on (lib)protoc, which I don't want. In general, I want to specify depedencies on a specific library, not a whole package. Actually, we have a modified version of the recipe, which also builds (lib)protobuf_lite, which makes the problem more apparent, since you cannot link to both libraries, since this would yield ambiguous symbols. |
I found a way to circumvent this problem now by using find_package(Protobuf). |
this one might be tricky to solve. I guess the following proposed conan feature may help: |
Really? Hm, then the problem appears to be more fundamental than I thought, in general. As I wrote, for libprotobuf specifically I found a way to circumvent this, so for my part, we could close this issue. |
okay, I am closing this for now, as this requires some new conan feature to implement. |
Description of Problem, Request, or Question
Library targets have different names under Windows and Linux because of different handling if "lib" prefix.
Package Details (Include if Applicable)
Steps to reproduce (Include if Applicable)
Using the conan cmake generator, in the CMakeLists.txt of a dependent package, I want to reference the library as
But this variant only works under Linux, while under Windows, I need to use
CONAN_LIB::Protobuf_libprotobuf
instead.The text was updated successfully, but these errors were encountered: