[yocto] Building a Qt4-x11 app.

Daniel Toussaint daniel at dmhome.net
Mon Apr 30 03:04:08 PDT 2012


On Mon, Apr 30, 2012 at 3:19 AM, Eric Bénard <eric at eukrea.com> wrote:
> Le Sun, 29 Apr 2012 21:16:44 +0800,
> Daniel Toussaint <daniel at dmhome.net> a écrit :
>
>> I wish to run an application developed with QT in a Yocto filesystem.
>> The app should be linked against Qt4-X11 libs. What is the exact work
>> flow to get my app cross compiled on my x86_64 host ?
>> So far I have :
>> -> Build a complete core-image-sato with IPKG as a packaging system.
>> -> Build qt4-x11-free
>> -> Build qt4-tools-nativesdk
>>
>> Now, I got something called qmake2 in the build directory
>> (sysroot-x86_64) , but it complains about not finding the right qmake
>> specs.
>> I got the feeling I am doing something fundamentally wrong with my
>> setup, can anyone enlighten me ?
>>
> simply write a recipe for your app and let the build system build
> your application.
>
> The recipe can be quite simple if your app doesn't depends on other
> libs than qt4 :
>
> DESCRIPTION = "Application QT4-X11"
> SECTION = "Apps"
> LICENSE = "yourlicense"
> LIC_FILES_CHKSUM = "file://youlicense;md5=yourmd5"
>
> inherit qt4x11
>
> SRC_URI = "file://application.tar.bz2"
> # or directly download it from a VCS
>
> # may be necessary :
> EXTRA_QMAKEVARS_PRE += "PREFIX=/usr"
> EXTRA_OEMAKE += "INSTALL_ROOT=${D}"
>
> do_install() {
>        oe_runmake install INSTALL_ROOT=${D}
> }
>
> Eric

Thanks a lot that worked great !

-- 
Gtalk: daniel.toussaint at gmail.com
Skype: supertoussi
Cell: +886-915-680-291



More information about the yocto mailing list