Thursday, July 11, 2013

Building chromiumembedded on Ubuntu with pkg-config

Even after installing the necessary gtk libraries, you may find chromiumembedded build script complaining about a missing gtk/gtk.h file. To remedy this, you just have to tell the script where to find it.

First, make sure you have the a suitable version installed.

$ pkg-config --cflags gtk+-3.0
-pthread -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12

pkg-config will output the necessary include parameters so the build script knows where to find the script.  If pkg-config returns nothing, make sure you have a gtk development package installed.

Once that is properly set up, add this to the build file's cflags.  Find the line in the Makefile that defines the cflags.  Add the `pkg-config` in backticks, so when make runs, it will evaluate the flags and include the correct directions.

CFLAGS.target ?= $(CFLAGS)
becomes
CFLAGS.target ?= $(CFLAGS) `pkg-config --cflags gtk+-3.0`


If everything worked, you should have a Debug or Release directory with a beautiful libcef.so library in it.

3 comments:

mathew delport said...

As I am fresher I have an interest in new Technology. So, now I am planning to learn Informatica in your blog i had some interesting concepts, it was crystal clear to read keep sharing thanks SAS Training in Chennai| SAS Course in Chennai

Aashi siva said...

Really, these quotes are the holistic approach towards mindfulness. In fact, all of your posts are. Proudly saying I’m getting fruitfulness out of it what you write and share. Thank you so much to both of you.

J2ee Training in Chennai Saidapet

Shalini said...

I just see the post i am so happy to the communication science post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be replay for your great thinks and I hope you post again soon.

digital marketing company in india