Skip to contentSkip to conversation

Advice needed on using Bitbake to make qt project (.pro) Click to flag this post

DISCUSSION Stuart Gray 3 participants 3 messages Jul 30, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

I am new to using Bitbake and would like to ask if anyone has links to examples on how to get Bitbake to build Qt projects.

I have successfully used Bitbake to add firmware files to my image, but I am about to look at building Qt projects into the image. I have already added the Qt Embedded package to the image.

Any advice would be great as I have very tight project timescales and I am trying to reduce risk as far as possible. I have been through the Bitbake example and searched online for examples. From what I understand I should just be able to add the .cpp, .h and .pro files to the SRC_URI list. Now I know from reading up on Bitbake that if the SRC_URI contains a makefile that Bitbake will recognise this and use it to compile the code, but is the same true if it contains a .pro file. Will it call qmake and then make?

Regards,
Stuart

#1 lore raw
Quoted 4 lines · Stuart Gray

Hi,

I am new to using Bitbake and would like to ask if anyone has links to examples on how to get Bitbake to build Qt projects.

Bitbake is not enough to have qt support you also need the openembedded-dev or stable repository.

Here is a short introduction http://wiki.openembedded.net/index.php/Getting_started

Than have a look at classes/qt4e.bbclass inside the openembedded directory and to get in touch how it works look into my qtnx recipe under recipes/qtnx/qtnx-qte_0.9.bb

Bye Henning

#2 lore raw
In reply to Stuart Gray
Quoted 9 lines · On Thursday 30 July 2009 08:23:29 Stuart Gray wrote:

Hi,

I am new to using Bitbake and would like to ask if anyone has links to examples on how to get Bitbake to build Qt projects.

I have successfully used Bitbake to add firmware files to my image, but I am about to look at building Qt projects into the image. I have already added the Qt Embedded package to the image.

Quoted 7 lines

Any advice would be great as I have very tight project timescales and I am trying to reduce risk as far as possible. I have been through the Bitbake example and searched online for examples. From what I understand I should just be able to add the .cpp, .h and .pro files to the SRC_URI list. Now I know from reading up on Bitbake that if the SRC_URI contains a makefile that Bitbake will recognise this and use it to compile the code, but is the same true if it contains a .pro file. Will it call qmake and then make?

The most simple example of a qmake based Qt4 project would be qsvn. The simple line of inherit qt4x11 will make sure your dependencies (Qt4 X11, qmake) get installed.

On the SRC_URI. Normally you either fetch a tarball, or from a SCM. If you want to pass all source files individually with SRC_URI you need to adjust the S variable to make qmake, etc. find the sources. Examples for that is shasum/shasum.inc. (Not the S = "${WORKDIR}").

Normally I encourage people to either fetch from a SCM or to use tarballs.

kind regards
holger