qt5base-lts/mkspecs/features/mac/default_post.prf
Tor Arne Vestbø 1308aa25fb Cache Xcode and SDK settings in .qmake.cache if it exists
The Xcode and SDK settings are expensive to resolve, as we're using
system() calls to resolve them. We now try to detect the presence of
a .qmake.cache file (and inform the user that creating one would be
a good idea), and use the file to cache the various settings after
resolving them.

The Xcode logic had to be moved form xcode.conf as part of the mkspec,
into default_pre/post.prf, so that we could cache() the resolved values.

Task-number: QTBUG-30586
Change-Id: Ib5368cfee6f7e4a4a33f6be70d0e20d96896fe56
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-08 14:07:41 +02:00

30 lines
1.3 KiB
Plaintext

load(default_post)
!no_objective_c:CONFIG += objective_c
# Pick a suitable default architecture for qmake-based applications.
# If the Qt package contains one of x86 and x86_64, pick that one. If it
# contains both then use the compiler default. Make a similiar decision for
# PowerPC-based systems. Note that this logic assumes that Qt has been
# configured with an architecture that is usable on the system.
qt:!isEmpty(QT_CONFIG) {
contains(QMAKE_HOST.arch, ppc)|contains(QMAKE_HOST.arch, "Power Macintosh") {
!contains(QT_CONFIG, ppc64):contains(QT_CONFIG, ppc):CONFIG += ppc
contains(QT_CONFIG, ppc64):!contains(QT_CONFIG, ppc):CONFIG += ppc64
} else {
!contains(QT_CONFIG, x86_64):contains(QT_CONFIG, x86):CONFIG += x86
contains(QT_CONFIG, x86_64):!contains(QT_CONFIG, x86):CONFIG += x86_64
}
}
isEmpty(_QMAKE_CACHE_) {
warning("No .qmake.cache is present. This significantly slows down qmake with this makespec.")
warning("Call 'cache()' in the top-level project file to rectify this problem.")
} else {
cache(QMAKE_XCODE_DEVELOPER_PATH)
cache(QMAKE_XCODE_VERSION)
}
# Ensure that we process sdk.prf first, as it will update QMAKE_CXX
# and friends that other features/extra compilers may depend on.
sdk: load(sdk)