An example of using FILES_${PN}

A recipe can (and usually does) produce more than one package. The system isn't completely stupid so for example all the headers will automatically go into -dev package and all documentation goes into -doc, but often the recipe writer needs to make a decision on which package a specific file belongs to. This is done with the FILES_<packagename> += "/path/to/file" format.

The default values for FILES_* can be found in meta/conf/bitbake.conf but note that classes your recipe inherits may also modify the values: check the final values with bitbake -e <recipe>|grep ^FILES_

In your case it looks like your project build system created some directories but didn't put anything in them? if that is the case you could alternatively modify your build system to not do that or add a do_install_append() function that removes the empty directories after installing.


usually <package name> is already defined in Yocto with ${PN} variable so files assignment would be simple. also asterisk * works fine if you'd like to add whole subtree. and perhaps consider to use some predefined variables on where to deposit your stuff on the final image tree:

FILES_${PN} += "${nonarch_base_libdir}/<your package folder>/*"