[yocto] Select make target for cmake

Philipp, Damian Damian.Philipp at vector.com
Thu Dec 10 09:24:16 PST 2015


Hello Yocto experts,

Is it possible to specify a make target (e.g., "make server" or "make client") in a recipe using cmake? I am writing a set of recipies for a software that is built from a single source tree and thus a single CMake configuration. The CMake configuration currently contains 3 targets, resulting in 3 separate binaries. We would like to control how these binaries are distributed to packages - currently we'd like to have bitbake build one package with the main application (e.g., a server application) and another package containing all other binaries (e.g., a set of client applications).

A Google search didn't turn up anything, so I looked through cmake.bbclass, autotools.bbclass and base.bbclass. The source indicated that the variable EXTRA_OEMAKE could be abused to inject a make target - however, setting EXTRA_OEMAKE = "server" in my recipe did *not* exclude the client binaries from the resulting image. In any case, I would prefer a clean solution over abusing implementation details.

Regards,
Damian




More information about the yocto mailing list