[cmake-developers] [PATCH 3/3] FindQt4: document cross compilation

Pascal Bach pascal.bach at siemens.com
Thu Jul 30 04:54:01 EDT 2015


Hi Clint, Hi Brad
> What I want to avoid is users thinking that what you are proposing overrides 
> any other way of finding Qt when cross compiling.
>
> The wording you propose is "To find Qt in a cross compile environment set the 
> following variables"
> However there are users for which setting only CMAKE_FIND_ROOT_PATH is enough.
> Or setting CMAKE_FIND_ROOT_PATH plus QT_QMAKE_EXECUTABLE is enough.
That sounds reasonable.
>
> Brad had a good question in another email.  Can't you set QT_QMAKE_EXECUTABLE?
> My guess, is no, because that qmake returns paths under one sysroot.

Brads suggestion doesn't work as it again finds the native Qt version.

 I think the proper way might be for CMake to be aware of that one sysroot is native and the other one is for the target.
so find_program would look in the native one and the other find_* functions would look in the target sysroot.

I'm not sure how this could be achived?
> I just realized something.  Your use case is similar or the same to one I had  
> tested FindQt4 with.
>
> Your Qt appears to be prefixed under /sysroot/arm/usr, not /sysroot/arm.
>
> Can you include /sysroot/arm/usr in CMAKE_FIND_ROOT_PATH, then see if FindQt4 
> can find your libraries under /sysroot/arm/usr.
This doesn't seem to work it still only finds the native Qt

Pascal


More information about the cmake-developers mailing list