PDA

View Full Version : How to build and install Qt apps on cross compiled embedded targets



sveinse
5th May 2010, 14:59
How should Qt application be built and installed when building for cross compiled embedded targets?

I'm building Qt 4.7 (w/QWS) for ARM Linux, using the CodeSourcery cross compiler. I have no problems configuring and building Qt (using "./configure -prefix /opt/qt ...") and then installing on the target staging filesystem directory (with "make install INSTALL_ROOT=/targetfs"). This installs everything under /targetfs/opt/qt which is what I want.

However, when I want to build my own Qt applications, the compiler complains because it tries to include "/opt/qt/include" which doesn't exist on host because it's a target path. How can I instruct Qt to look for "/targetfs/opt/qt/include" which is to where Qt installed the headers?

I've experimented with -hostprefix, but it doesn't work like I hoped. With "make install INSTALL_ROOT=..." it will install everything even the host tools under this install root (*edit* using the hostprefix path inside the INSTALL_ROOT directory)

How is this supposed to be done?

sveinse
10th May 2010, 13:44
*bump*

Perhaps others can tell how they build and install Qt and Qt apps for embedded targets, please.

Piskvorkar
30th June 2011, 13:39
Hi,
I'm solving same problem. I just forgot to INSTALL_ROOT (unfortunatelly) and have Qt installed in path /usr/local/qt4-${ARCHITECTURE}. But I also would prefere solution with INSTALL_ROOT .. The only solution I see is to have two build of Qt, one for target and the second for host (with host specific prefix).
If you already know the solution, please let me know.

BR