CMake: Use target install prefix for MODULE_BASE_OUTDIR

When building qtbase for iOS with CMake, and then trying to mix build
qtsvg with qmake, the value of MODULE_BASE_OUTDIR was wrongly set
to the host prefix because that usually coincides with the target
prefix when doing builds with just qmake.

That is not the case for CMake builds, where the host and target
prefix locations are necessarily different.

This caused syncqt to place the forwarding headers inside the host
prefix location instead of the target prefix location, and thus
compiling qtsvg files failed.

Make sure to use the target install prefix instead of the host one.

Task-number: QTBUG-82581
Task-number: QTBUG-84781
Task-number: QTBUG-85240
Change-Id: I592be0b2799c72c11497c8adc12be13106082cfc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2020-06-30 15:14:14 +02:00
parent e9200ce4b0
commit 36b0d9b51c

View File

@ -24,6 +24,6 @@ exists($$MODULE_BASE_INDIR/.git): \
!force_independent {
# If the module is not built independently, everything ends up in qtbase.
# This is the case in non-prefix builds, except for selected modules.
MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
MODULE_BASE_OUTDIR = $$[QT_INSTALL_PREFIX]
MODULE_QMAKE_OUTDIR = $$[QT_INSTALL_PREFIX]
}