[poky] Cannot use QT_VERSION in project file when building Qt app

Erik Botö erik.boto at pelagicore.com
Fri Nov 9 02:16:02 PST 2012


Hi,

I have a very simple recipe:

DESCRIPTION = "My App"
SECTION = "system"
LICENSE = "CLOSED"
PR="r1"
SRC_URI = "file://${PN}_${PV}.tar.gz"
DEPENDS = "qt-mobility-x11"
S = "${WORKDIR}/${PN}-${PV}/"
inherit qmake2 qt4x11

In the .pro file I have some checks for the QT version used, e.g. :

contains(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 6) {
    // stuff
}

But it appears as the QT_VERSION, QT_MAJOR_VERSION and
QT_MINOR_VERSION variables are not set.

If I run qmake2 --version in i devshell I get the correct version:
$ qmake2 -v
QMake version 2.01a
Using Qt version 4.8.1 in
/home/erbo/pcore/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib

Any ideas what the issue could be?

Cheers,
Erik



More information about the poky mailing list