Nanopb generates header files that need to be available before being
included. This isn't an issue for a target where the files were added
with zephyr_nanopb_sources. But if another target wants to include
these generated files we need a cmake dependency chain.
The nanopb_generated_headers custom target been added for this purpose.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The Nanopb cmake locates the protoc executable, verify the result
instead of doing it ourselves.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Introduce a helper function zephyr_nanopb_sources to generate
source files and add these to a target.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>