The simplest way I found to solve this was to add the following to my recipe
PACKAGES += " ${PN}-include"
${PN}-include_FILES = "foobar.h"
BBCLASSEXTEND =+ "native"
By doing this I could get away with one recipe for both {PN} and ${PN}-native.
And all the target package needs to do is to RDEPEN
Hello. We have a native package that implements a header file that is
required also by another non-native package. What is the best approach
to handle such a situation?
I guess one option is to create two recipes for the package containing
the header filer; one native and a one non-native that does