[oe] Cross-compiling qt based programs with cmake
Valentin Longchamp
valentin.longchamp at epfl.ch
Thu Aug 13 13:22:10 UTC 2009
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) ?
> - the pkg-config files for Qt should be correct.
>
>
> So my proposals include:
> - Consider renaming qmake2 to qmake or qmake-qt4 (and move qt3 to qmake-qt3)
Well, I don't think we need to change this anymore. As I said, a simple
patch would allow FindQt4 cmake module to find qmake2 too (or I did not
get what you meant here).
> - for X11/Embedded create a separate bin dir for qmake, create a symlink and
> place a qt.conf in it.
This seems to be a very interesting. But isn't it qmake.conf now ?
http://doc.trolltech.com/4.5/qmake-variable-reference.html
> - maybe convince Alexander Neuendorf to use pkg-config to find Qt too..
I think he does use qmake, because a qt build needs other tools besides
the libs and headers, and pkg-config does not find them, but qmake does.
But pkg-config could be used to find the libs and headers, you're right.
>
>
> what do you think?
>
If I got what you meant right, your idea of producing an accurate
qmake.conf file that correctly fits the locations of the headers and
libs seems very interesting. But I still need to figure out how
--
Valentin Longchamp, PhD Student, EPFL-STI-LSRO1
valentin.longchamp at epfl.ch, Phone: +41216937827
http://people.epfl.ch/valentin.longchamp
MEA3485, Station 9, CH-1015 Lausanne
More information about the Openembedded-devel
mailing list