Hi all,

I have recipe A that builds a cmake project which, among other dependencies, 
also has "find_package(pkgconfig)", so, I inherited the pkgconfig class in the 
recipe. This cmake project is used by other projects since it builds a .so, 
thus I am also exporting the AConfig.cmake file, which contains the 
"find_package(pkgconfig)" call. This works well, the project is built and the 
pkg-config binary is in recipe-sysroot-native (as expected).

Recipe B builds another cmake project, which depends on the cmake project A. 
Thus, I added recipe A to recipe B's DEPENDS. As expected, this nicely copies 
everything needed from recipe A (the .so file, the headers, the AConfig.cmake 
and ATargets.cmake, etc.). However, (expectedly?) it does not copy the 
pkg-config binary along with it, thus building recipe B fails, because the 
"find_package(pkgconfig)" call from the AConfig.cmake file fails.

Is the above usage of PkgConfig correct? I understand the pkg-config binary 
from recipe A's recipe-sysroot-native should not be copied to recipe B's 
recipe-sysroot-native, but still don't understand how this all is supposed to 
work. Shouldn't all dependencies from recipe A also be available for recipe B?

It goes without saying, when I inherit the pkgconfig class in recipe B, 
everything works as expected (because the pkg-config binary is found in 
recipe-sysroot-native of recipe B), but this is also not correct, as recipe B 
does not really depend on pkgconfig and shouldn't even know about it.

Cheers,
Aleksandar

[1]
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64005): https://lists.yoctoproject.org/g/yocto/message/64005
Mute This Topic: https://lists.yoctoproject.org/mt/108943953/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to