jgsogo / conan-recipes

Recipes for (my) libraries and some ports from conan-center-index
MIT License
1 stars 0 forks source link

[magnum] When it is transitive (and direct) requirement it links plugins too #46

Open jgsogo opened 2 years ago

jgsogo commented 2 years ago

🚨 If using TARGETS the library AnyAudioImported is propagated to Magnum targets and linking fails because it cannot be found (it is in a different directory).

Need to understand how this library reaches the linker and what can be done to avoid it.

Does this only happen when this is a transitive dependency?

_Originally posted by @jgsogo in https://github.com/jgsogo/conan-recipes/pull/44#discussion_r857090918_

jgsogo commented 2 years ago

The problem is when magnum is included via transitive dep instead of direct dependency.

Conan includes transitive dependencies (render_context -> magnum) and then it fails. If we find_package(Magnum) first and then find_package(render_context) it works.