Log4Qt crosscompiling on x86-win32 for arm-linux
djbuijs last edited by
I am trying to Build Log4Qt on a Windows machine (customer requirement...) for an embedded board running linux on a ARM Cortex-A9. I use qmake (4.7.4) to generate the Makefiles (I am not using Qt Creator).
I want to make sure I go about this the right way which is the reason for this post:
- Cross compile Qt for arm-linux as described here: http://qt-project.org/forums/viewthread/18672
- Generate Makefiles using a Qt installation for Windows.
- Now I get to the sticky bit: Qt4Log should be linked against the cross-compiled Qt, so not the Windows version. At this point the generated Makefiles contain include directories (INCPATH) from the Qt for Windows installation.... This was what I came up with: I can modify the Log4Qt.pri file to include different directories in case of a cross-build, so something like this:
CONFIG += qt
QT += core
INCLUDEPATH += $$(QT4_ARM_DIR)/include
INCLUDEPATH += $$(QT4_ARM_DIR)/include/QtCore
This feels somewhat clunky.... I haven't actually tried yet (cross-compiling Qt on Windows turns out to be NOT trivial.....), but is this a valid approach or is there a better way to do this?