How to re-use shared library from another package to compile a new package in yocto?

I want to add new package to yocto that is depend on other package (composed by library so file and binary) that I get it from git. The new package must use the shared library from old package to build it.

The source code of old library must centralized in one place and all package (project) just use it if needed.

How can I build my package without changing my old package?

Can I get two source from git in bb file and after that compile them by order library and new application? if yes how?

I tried to search that but I haven't found any persistant result.

Example:

Upvotes: 1

Views: 3030

Answers (1)

Dan Rosenqvist
Dan Rosenqvist

Reputation: 91

If I understand your question correctly, you are trying to build a package that is depending on another package (the library in this case).

My suggestion would be to first create a package of the library (in a separate .bb file) and then using the DEPENDS and RDEPENDS flags in the other project to make sure your build system is aware of the dependency.

Upvotes: 2

Related Questions