-
Notifications
You must be signed in to change notification settings - Fork 989
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
private linking of transitive dependencies #13302
Comments
quick hint @tbsuht: do not use package names in uppercase, as that will be incompatible with 2.0. please start using packages lowercase I am having a quick check in Windows first, and it builds in Windows correctly (except it fails in the final app |
I have been able to dig deep into this. The issue is originated because the So you are correct, the workaround would be to define PUBLIC dependency on it. |
@memsharded thanks for the fast response!
Do you know why this is not a problem on Windows if that is related to the generated CMake files?
I can fix the linking manually by providing the lib paths via "-rpath-link". But those path infos are not available as it's an imported target?
Will this also be available in Conan 1.X? I was wondering a little bit: is this an uncommon use case? |
Another workaround instead of using PUBLIC for linking: In the conanfile of app:
and its CMakeLists.txt
what do you think makes more sense to use? |
I'd rather fix it at the conan level: Anyway, thanks for a workaround much better than previous ones. |
Hi @PengZheng, @tbsuht It is better not to use the |
To be considered in #13018. |
I've setup a small example. If this is not related to the topic of the discussion above, we can also move this into a new issue.
The relationship is as follows ("->" == "depends on"):
app -> libB
libB -> libA
libA -> libX & libY
Build via:
This is failing with:
The error is gone once you link libB PUBLIC against libA.
target_link_libraries(libB PUBLIC libA::libA)
I was wondering whether this is related to this issue, but I might be wrong.
Originally posted by @tbsuht in #7192 (comment)
The text was updated successfully, but these errors were encountered: