[oe] Cross-compiling qt based programs with cmake

Holger Hans Peter Freyther holger+oe at freyther.de
Thu Aug 13 14:23:07 UTC 2009


On Thursday 13 August 2009 15:22:10 Valentin Longchamp wrote:
> Holger Hans Peter Freyther wrote:
> > On Thursday 13 August 2009 11:11:48 Valentin Longchamp wrote:
> >> Hello,
> >>
> >> I am trying to build cmake based programs that use QT with Openembedded.
> >> The actual support for cmake in OE worked until now because I only had
> >> "simple" dependencies. Now with QT as as dependency, I use the cmake
> >> FindQt4 Module that strongly relies on qmake to find the different QT
> >> cmake variables (try to run ${STAGINGBINDIR}/qmake2 -query). The cmake
> >> FindQt4 Module uses the values given by qmake to determine where all the
> >> libraries and tools are installed (and if installed).
>
> Thanks for your feedback zecke.
>
> > Let me throw in some (pseudo) facts:
> > 	- We want to use one qmake2 for Qt/X11, Qt/Embedded Linux builds
> > 	- qmake is reading a qt.conf from the directory of the binary. In Qt/X11
> > 	 and Qt/E build we write a custom one.
>
> What do you mean by the binary ? The qmake binary ? Is the custom file
> you mention the linux.conf file (like
> openembedded/recipes/qt4/files/linux.conf, with some parts defined in
> openembedded/classes/qt4e.bbclass) ?


binary = qmake2
path = /usr/foo/bin/qmake2
strace /usr/foo/bin/qmek2 | grep qt.conf
 lstat("/usr/foo/bin/qt.conf")

just look at qt4.inc. With a "qt.conf" you can define every value of qmake2 -
query. So when building Qt we put qmake2 into a special place and put the 
qt.conf we want (X11 or Embedded Linux next to it).

You seem to be a bit confused. qmake.conf etc. are part of the QMAKESPEC, 
qt.conf is something different for deployment...

z.





More information about the Openembedded-devel mailing list