All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentin Longchamp <valentin.longchamp@epfl.ch>
To: "openembedded-devel@lists.openembedded.org"
	<openembedded-devel@lists.openembedded.org>
Subject: Cross-compiling qt based programs with cmake
Date: Thu, 13 Aug 2009 11:11:48 +0200	[thread overview]
Message-ID: <4A83D8D4.7060206@epfl.ch> (raw)

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).

The problem is that all the variables defined by qmake2 -query point to 
the ${STAGING_DIR}/${HOST_SYS}/ as you can se below:

> valentin@lsro1arena:~/OE/angstrom/staging$ x86_64-linux/usr/bin/qmake2 -query
> QT_INSTALL_PREFIX:/home/valentin/OE/angstrom/staging/x86_64-linux/usr
> QT_INSTALL_DATA:/home/valentin/OE/angstrom/staging/x86_64-linux/usr
> QT_INSTALL_DOCS:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/doc
> QT_INSTALL_HEADERS:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/include
> QT_INSTALL_LIBS:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/lib
> QT_INSTALL_BINS:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/bin
> QT_INSTALL_PLUGINS:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/plugins
> QT_INSTALL_TRANSLATIONS:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/translations
> QT_INSTALL_CONFIGURATION:/etc/xdg
> QT_INSTALL_EXAMPLES:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/examples
> QT_INSTALL_DEMOS:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/demos
> QMAKE_MKSPECS:/home/valentin/OE/angstrom/staging/x86_64-linux/usr/mkspecs
> QMAKE_VERSION:2.01a
> QT_VERSION:4.5.1


But in order to be used, these values should point to a place that is 
more like ${STAGING_INCDIR}. If we take the includes example, 
QT_INSTALL_HEADERS is 
/home/valentin/OE/angstrom/staging/x86_64-linux/usr/include ( 
${STAGING_DIR}/${HOST_SYS}/include) but it should be 
/home/valentin/OE/angstrom/staging/armv6-angstrom-linux-gnueabi/usr/include/qtopia/ 
(that corresponds to ${STAGING_INCDIR}/qtopia) as you can see below.

> valentin@lsro1arena:~/OE/angstrom$ ll staging/armv6-angstrom-linux-gnueabi/usr/include/qtopia/
> total 160K
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 phonon
> drwxr-xr-x 2 valentin valentin  32K 2009-06-17 20:43 Qt
> drwxr-xr-x 2 valentin valentin  16K 2009-06-17 20:43 Qt3Support
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtAssistant
> drwxr-xr-x 2 valentin valentin  20K 2009-06-17 20:43 QtCore
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtDBus
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtDesigner
> drwxr-xr-x 2 valentin valentin  36K 2009-06-17 20:43 QtGui
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtHelp
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtNetwork
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtScript
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtScriptTools
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtSql
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtSvg
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtTest
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtUiTools
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtWebKit
> drwxr-xr-x 2 valentin valentin 4.0K 2009-06-17 20:43 QtXml

The problem is that these QT_INSTALL_* values are determined at 
configure time, and it is hard to change them.

An inelegant but efficient way to resolve this problem would be to 
"double install" the headers and libs of qt (or qtopia) also in 
${STAGING_DIR}/${HOST_SYS}.

But I am pretty sure there is a more elegant way to do it, especially 
using qt4e.bbclass where all the releveant paths are used.

Is there a qt4 wizard in OE that could help me ?

Val

-- 
Valentin Longchamp, PhD Student, EPFL-STI-LSRO1
valentin.longchamp@epfl.ch, Phone: +41216937827
http://people.epfl.ch/valentin.longchamp
MEA3485, Station 9, CH-1015 Lausanne



             reply	other threads:[~2009-08-13  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-13  9:11 Valentin Longchamp [this message]
2009-08-13  9:34 ` Cross-compiling qt based programs with cmake Holger Hans Peter Freyther
2009-08-13 13:22   ` Valentin Longchamp
2009-08-13 14:23     ` Holger Hans Peter Freyther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A83D8D4.7060206@epfl.ch \
    --to=valentin.longchamp@epfl.ch \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.