PDA

View Full Version : cross-compiling a Qt app for MacOS X?



akos.maroy
3rd August 2009, 20:37
I have a cross-compiling setup, where I can compile MacOS X binaries on a Linux machine. I can compile generic libraries / applicaitons fine. I can even use qmake to do all this.

But when it comes to compiling and linking Qt-based applicaiton, I'm encountering some issues. When I do the same thing using a win32-mingw-based cross-compilation toolchain, I simply set in the qmake project file:



QMAKE_INCDIR_QT = $$(QT_HOME)/include
QMAKE_LIBDIR_QT = $$(QT_HOME)/lib


where QT_HOME points to the windows-based Qt home directory tree. this way, all the proper includes & libraries are found. but, on MacOS X, Qt is not contained in a single directory tree, but in a number of frameworks:



Qt3Support.framework
QtAssistant.framework
QtCore.framework
QtDBus.framework
QtDesignerComponents.framework
QtDesigner.framework
QtGui.framework
QtHelp.framework
QtNetwork.framework
QtOpenGL.framework
QtScript.framework
QtScriptTools.framework
QtSql.framework
QtSvg.framework
QtTest.framework
QtWebKit.framework
QtXml.framework
QtXmlPatterns.framework


so it doesn't seem to be that straightforward to set QMAKE_INCDIR_QT and such. also, I'm not that familiar on how to handle frameworks with qmake. would one need to add all the above frameworks one by one manually? isn't there a way to tell qmake to find all of them in a single spot - the same way it's done when compiling on MacOS X?

thus any idea on how to make this work would be very welcome..