Background
I have cross-compiled Qt for ARM target using the arm-linux-gnueabihf-gcc
toolchain.
running qmake -query
gives (among other values) QMAKE_XSPEC:arm-linux-gnueabihf-g++
.
When running qbs-setup-qt <path to the qmake> armqt
I get empty (""
) value for Qt.core
's tragetPlatform
property for the armqt
profile. I would expect to get "linux"
.
This causes a failure when loading the Qt.core
module, which has a condition that forces qbs.targetPlatform === targetPlatform
. Here qbs.targetPlatform
equals "linux"
while targetPlatform
is empty.
The target platform is determined in qtprofilesetup.cpp
at the function qbsTargetPlatformFromQtMkspec
. It looks for QMAKE_XSPEC values starting with "linux-"
My question
Is there a way to avoid this false detection? I can patch the code to allow the 'linux' to appear after the first'-' or something like that, but I'm not sure it has other effects.
Thanks.