Search code examples
boostyoctobitbakerecipe

How to setup a bitbake/Yocto recipe to use only a subset of the boost library?


I am playing a bit around with my Raspberry Pi and Yocto. I wrote a program. This is build with cmake and links against some parts of the boost library.

To keep the sd-card memory food print as small as possible I like to tell yocto, that it has only to link/build & deploy against some certain parts of the the boost library. My problem I do not know how to do this. Maybe someone can tell me.

Below I put the listing of my recipe:

SUMMARY = "mytest"
SECTION = "app"
LICENSE = "CLOSED"

inherit cmake

DEPENDS = "boost libconfig"

SRCREV = "${AUTOREV}"

SRC_URI = "git:///home/mytest/;protocol=file"

S = "${WORKDIR}/git"

I am only using from boost:

system thread program_options

As far as I see Yocto is building separate packages for the libs - like

libboost-thread1.66.0-1.66.0-r0.cortexa7hf_neon_vfpv4.rpm

The source of the boost recipe does not tell how to include the parts.


Solution

  • You can add the following instructions to your recipe:

    DEPENDS = "boost libconfig"
    RDEPENDS_${PN} = "boost-system boost-thread boost-program-options"
    

    And it will ship only requested libs.