* need help in qt environment setup
@ 2014-11-12 13:13 Alexander Varnin
[not found] ` <CADwFkYd=SXmPxRGS5c7YnOkSwGhagN1sGnsTBuQiamg04RjQog@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Varnin @ 2014-11-12 13:13 UTC (permalink / raw)
To: openembedded-core
Hello!
I am using yocto to build images and develop software for my freescale
imx53 board.
I need some help setting up environment for QT based software development.
My software requires qt4 (embedded) support.
There is several ways to use toolchain.
First, I can use toolchain from build directory where I've compiled
qt4-embedded recipe. There I create environment-setup script using command:
bitbake meta-ide-support
Second, I can build SDK for my image:
bitbake image-name -c populate_sdk
Third, I can use meta-toolchain-qt recipe to build QT containing SDK:
bitbake meta-toolchain-qte
The first two methods is most convenient for me, because I need some
additional libraries that is not included in meta-toolchain-qte. The
first method is better, because I develop software on the same host,
where yocto is located, so I don't need separate SDK installation.
However, only the last method produces environment settings for QT
placed in
/opt/poky/1.6.1/sysroots/i686-pokysdk-linux/environment-setup.d folder.
Other two methods produce environment-setup scripts, but they don't
create sysroots/i686-linux/environment-setup.d folder. So QT environment
settings lacks from this installations.
The best way I would like to solve it, is to somehow make 'bitbake
meta-ide-support' generate environment settings for QT in my build dir,
so I can use my local (non-SDK) cross toolchain to build QT software.
How can I achieve it?
It is ok for me to use SDK as well, however, I want it to be my image
based SDK.
Thanks for any help.
Alexander.
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: <CADwFkYd=SXmPxRGS5c7YnOkSwGhagN1sGnsTBuQiamg04RjQog@mail.gmail.com>]
[parent not found: <CADwFkYfYuhm14dAniVRZbCzcMoS8FQWHVOfNupCktU-tQ9TtCw@mail.gmail.com>]
* Re: need help in qt environment setup [not found] ` <CADwFkYfYuhm14dAniVRZbCzcMoS8FQWHVOfNupCktU-tQ9TtCw@mail.gmail.com> @ 2014-11-13 13:26 ` Alexander Varnin 0 siblings, 0 replies; 2+ messages in thread From: Alexander Varnin @ 2014-11-13 13:26 UTC (permalink / raw) To: Yi Qingliang; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 4183 bytes --] 13.11.2014 09:20, Yi Qingliang пишет: > and then use '${OE_QMAKE_QMAKE}' but not 'qmake' directly. > > On Thu, Nov 13, 2014 at 2:18 PM, Yi Qingliang > <niqingliang2003@gmail.com <mailto:niqingliang2003@gmail.com>> wrote: > > mkdir -p recipes-qt/meta > touch meta-ide-qte-support.bb <http://meta-ide-qte-support.bb> > > fill the meta-ide-qte-support.bb <http://meta-ide-qte-support.bb> > with following contents. > and 'bitbake meta-ide-qte-support' just like 'bitbake > meta-ide-support'. > GOOD LUCK! > > > CRIPTION = "Meta package for ensuring the build directory contains > all appropriate toolchain packages for using an IDE & QTE" > LICENSE = "MIT" > LIC_FILES_CHKSUM = > "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ > > file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" > > DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native > qemu-helper-native unfs3-native" > DEPENDS += "qt4-embedded" > PR = "r1" > > inherit meta toolchain-scripts > > QT_TOOLS_PREFIX = "${STAGING_DIR_NATIVE}${bindir}" > > toolchain_create_tree_env_script_append() { > scriptori=${script} > script=${scriptori}-qte > > rm -f $script > touch $script > cat $scriptori >> $script > > # please follow the corresponding variables in qt4e.bbclass > echo 'export OE_QMAKE_LIBS_X11=""' >> $script > echo 'export OE_QMAKE_LIBS_QT="qt"' >> $script > echo 'export QT_DIR_NAME="qtopia"' >> $script > echo 'export QT_LIBINFIX="E"' >> $script > > echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script > echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script > echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script > echo 'export OE_QMAKE_CC="$CC"' >> $script > echo 'export OE_QMAKE_CXX="$CXX"' >> $script > echo 'export OE_QMAKE_LINK="$CXX"' >> $script > echo 'export OE_QMAKE_AR="$AR"' >> $script > echo 'export > OE_QMAKE_LIBDIR_QT=${STAGING_DIR_TARGET}${libdir}' >> $script > echo 'export > OE_QMAKE_INCDIR_QT=${STAGING_DIR_TARGET}${includedir}/${QT_DIR_NAME}' > >> $script > echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc4' >> $script > echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic4' >> $script > echo 'export OE_QMAKE_UIC3=${QT_TOOLS_PREFIX}/uic34' >> $script > echo 'export OE_QMAKE_RCC=${QT_TOOLS_PREFIX}/rcc4' >> $script > echo 'export > OE_QMAKE_QDBUSCPP2XML=${QT_TOOLS_PREFIX}/qdbuscpp2xml4' >> $script > echo 'export > OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script > echo 'export > OE_QMAKE_QT_CONFIG=${STAGING_DIR_TARGET}${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' > >> $script > echo 'export > QMAKESPEC=${STAGING_DIR_TARGET}${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' > >> $script > echo 'export OE_QMAKE_QMAKE=${QT_TOOLS_PREFIX}/qmake2' >> $script > > # make a symbolic link to mkspecs for compatibility with > Nokia's SDK > # and QTCreator > (cd ${QT_TOOLS_PREFIX}/..; ln -sf > ${STAGING_DIR_TARGET}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;) > } > > do_populate_ide_support () { > toolchain_create_tree_env_script > } > > do_populate_ide_support[nostamp] = "1" > do_populate_ide_support[recrdeptask] = "do_package_write" > addtask populate_ide_support before do_build after do_install > > Thank you! I used your suggestions and made it work for me with following differences: - use of environment-setup.d folder (introduced with 457291f2ca084d1f43c0cca2175b448a22761887 and e7b9e1df19062cfbcd72c90295829424cae6fbed commits) instead of appending script. - I created meta-ide-support.bbclass to avoid code duplication Here is a draft patch attached of how I did it. I am ready to work on upstream-suitable patch for this feature, if someone wants to hint me how to do it properly. [-- Attachment #2: 0001-recipes-qt-meta-ide-qte-support-recipe-introduced.patch --] [-- Type: text/x-diff, Size: 4733 bytes --] From d83e00483b735db7e056f5683a5aaba60b16013e Mon Sep 17 00:00:00 2001 From: "A. Varnin" <fenixk19@mail.ru> Date: Thu, 13 Nov 2014 16:18:20 +0300 Subject: [PATCH] recipes-qt: meta-ide-qte-support recipe introduced meta-ide-qte-support is capable of generating environment-setup.d script for application development evironment with QT(e) support Signed-off-by: A. Varnin <fenixk19@mail.ru> --- meta/classes/meta-ide-support.bbclass | 12 ++++++++ meta/recipes-core/meta/meta-ide-support.bb | 9 +----- meta/recipes-qt/meta/meta-ide-qte-support.bb | 45 ++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 meta/classes/meta-ide-support.bbclass create mode 100644 meta/recipes-qt/meta/meta-ide-qte-support.bb diff --git a/meta/classes/meta-ide-support.bbclass b/meta/classes/meta-ide-support.bbclass new file mode 100644 index 0000000..16c759b --- /dev/null +++ b/meta/classes/meta-ide-support.bbclass @@ -0,0 +1,12 @@ + +DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native" + +inherit meta toolchain-scripts + +do_populate_ide_support () { + toolchain_create_tree_env_script +} + +do_populate_ide_support[nostamp] = "1" +addtask populate_ide_support before do_build after do_install + diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/recipes-core/meta/meta-ide-support.bb index 2f92912..b2e33a2 100644 --- a/meta/recipes-core/meta/meta-ide-support.bb +++ b/meta/recipes-core/meta/meta-ide-support.bb @@ -4,14 +4,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native" PR = "r3" -inherit meta toolchain-scripts +inherit meta-ide-support -do_populate_ide_support () { - toolchain_create_tree_env_script -} - -do_populate_ide_support[nostamp] = "1" -addtask populate_ide_support before do_build after do_install diff --git a/meta/recipes-qt/meta/meta-ide-qte-support.bb b/meta/recipes-qt/meta/meta-ide-qte-support.bb new file mode 100644 index 0000000..42b4210 --- /dev/null +++ b/meta/recipes-qt/meta/meta-ide-qte-support.bb @@ -0,0 +1,45 @@ +SUMMARY = "Integrated Development Environment support" +DESCRIPTION = "Meta package for ensuring the build directory contains all appropriate toolchain packages for using an IDE & QTE" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit meta-ide-support + +DEPENDS += "qt4-embedded" +PR = "r1" + + +QT_TOOLS_PREFIX = "${STAGING_DIR_NATIVE}${bindir}" +QT_DIR_NAME = "qtopia" + + +toolchain_create_tree_env_script_append() { + mkdir -p ${STAGING_DIR_NATIVE}/environment-setup.d/ + script=${STAGING_DIR_NATIVE}/environment-setup.d/${QT_DIR_NAME}.sh + + echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' > $script + echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script + echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script + echo 'export OE_QMAKE_CC=$CC' >> $script + echo 'export OE_QMAKE_CXX=$CXX' >> $script + echo 'export OE_QMAKE_LINK=$CXX' >> $script + echo 'export OE_QMAKE_AR=$AR' >> $script + echo 'export OE_QMAKE_LIBDIR_QT=$OECORE_TARGET_SYSROOT${libdir}' >> $script + echo 'export OE_QMAKE_INCDIR_QT=$OECORE_TARGET_SYSROOT${includedir}/${QT_DIR_NAME}' >> $script + echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc4' >> $script + echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic4' >> $script + echo 'export OE_QMAKE_UIC3=${QT_TOOLS_PREFIX}/uic34' >> $script + echo 'export OE_QMAKE_RCC=${QT_TOOLS_PREFIX}/rcc4' >> $script + echo 'export OE_QMAKE_QDBUSCPP2XML=${QT_TOOLS_PREFIX}/qdbuscpp2xml4' >> $script + echo 'export OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script + echo 'export OE_QMAKE_QT_CONFIG=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script + echo 'export QMAKESPEC=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script + echo 'export OE_QMAKE_QMAKE=${QT_TOOLS_PREFIX}/qmake2' >> $script + echo 'export QT_CONF_PATH=$OECORE_NATIVE_SYSROOT${sysconfdir}/qt.conf' >> $script + + # make a symbolic link to mkspecs for compatibility with Qt SDK + # and Qt Creator + (cd ${STAGING_DIR_NATIVE}${bindir}/..; rm -f mkspecs; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;) +} + -- 1.9.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-13 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 13:13 need help in qt environment setup Alexander Varnin
[not found] ` <CADwFkYd=SXmPxRGS5c7YnOkSwGhagN1sGnsTBuQiamg04RjQog@mail.gmail.com>
[not found] ` <CADwFkYfYuhm14dAniVRZbCzcMoS8FQWHVOfNupCktU-tQ9TtCw@mail.gmail.com>
2014-11-13 13:26 ` Alexander Varnin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox