[poky] recipe gtk program include directories

Gerard van den Bosch gerard at de-haardt.com
Mon Feb 28 06:49:11 PST 2011


Hello,

I have created a simple program with GTK and now I want to add it as a 
package in poky.
Because it is a single C file I have constructed the following recipe:

DESCRIPTION = "Battery indication"
SECTION = "examples"
LICENSE = "GPL"
DEPENDS = "gtk+"

SRC_URI = "file://image.c"

S = "${WORKDIR}"

do_compile() {
     ${CC} image.c -o image
}

do_install() {
     install -d ${D}${bindir}
     install -m 0755 image ${D}${bindir}
}

Now I have the problem that on my ubuntu computer I normally add 
`pkg-config --libs --cflags gtk+-2.0` to the gcc compile line to include 
the right directories.

But I don't understand how to do this in a recipe, can someone point me 
to an example or explain how this is done?

I already looked at a clutter bb file and the gtk-theme bb file but I 
can't see where they do this.
I tried to add CFLAGS += "-Wl,-rpath-link,${STAGING_LIBDIR}" but when I 
compile it's still missing gtk/gtk.h.

Regards,
Gerard





More information about the poky mailing list