[Development] One qmake and cross compilation for different targets

Oswald Buddenhagen oswald.buddenhagen at digia.com
Fri Aug 23 11:11:20 CEST 2013

On Thu, Aug 22, 2013 at 08:39:15PM +0000, Tomasz Olszak wrote:
> Let's Suppose that we have 2 different targets (ARM,MIPS) and we want
> develop on Windows, Mac and linux 64/32 bit. If I am provider of Qt cross
> compiled binaries for ARM and MIPS then in the end I can't provide complete
> development toolchain because I don't know which host OS will be used for
> crosscompilation. So either I will cross compile Qt NxM (where N number of
> hosts, M number of targets) times or suggest developers to built Qt on
> their own.
> Is there a way to extract data from Qt libraries (ARM, MIPS) and build
> corresponding host's qmake, moc etc. for these targets?
the blackberries asked me the same question a few days ago ...
unfortunately there is no clean way to avoid the NxM compilations; the
qmake instance is too tightly coupled to the qt build (it's also the
actual "identifier" of a particular qt as far as qtcreator is
you can try some trickery to avoid the redundancy behind the scenes:
- compile all builds for one target with the same -prefix but different
- hard-link the binaries in the -hostbindir's for the same host systems
  but different -prefixes. note: you must put a qt.conf in each
  -hostbindir to override qmake's built-in idea of which qt build it
  belongs to.
so it's mostly an installation/packaging challenge. you can do many of
the actual compilations selectively per directory once you have figured
out which targets you need.

More information about the Development mailing list