qt5base-lts/mkspecs/features/qt_module.prf
Thiago Macieira 6a6fd56e66 Move the sub-architecture feature to better places in qmake
Instead of saving the ability of the compiler to produce SSE2, AVX,
Neon, etc. code in .qmake.cache (Unix) or qconfig.pri (Windows), move
everything to qmodule.pri. Accordingly, move the DEFINES += settings
to qt_module.prf instead of qt.prf.

This allows us to re-use these settings in other Qt modules (other
than qtbase), if necessary. Though currently the extra compiler
definitions are found only in src/gui/gui.pro. They can be moved
elsewhere when it becomes necessary.

As a side-effect of this change, some other flags are moved from
.qmake.cache to qmodule.pri (on Unix). The flags that are getting
moved should probably be moved anyway.

Change-Id: Ibc3ab0111e148d81870772f9357273660aa93417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-31 17:55:49 +02:00

47 lines
2.1 KiB
Plaintext

# This file is loaded on-demand, before any .qmake.cache (sometimes *in* .qmake.cache), to loaded
# important settings for modules, such as paths to QtBase, settings etc.
# Consequently, we have to do some stunts to figure out where to find qmodule.pri.
isEmpty(QMAKE_QT_MODULE)|!exists($$QMAKE_QT_MODULE) {
exists($$QTDIR/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$QTDIR/mkspecs/qmodule.pri
QMAKE_CACHE_DIR = $$dirname(_QMAKE_CACHE_)
!exists($$QMAKE_QT_MODULE):exists($$QMAKE_CACHE_DIR/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$QMAKE_CACHE_DIR/mkspecs/qmodule.pri
!exists($$QMAKE_QT_MODULE):exists($$QMAKE_CACHE_DIR/qtbase/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$QMAKE_CACHE_DIR/qtbase/mkspecs/qmodule.pri
!exists($$QMAKE_QT_MODULE):if(!isEmpty(QT_BUILD_TREE) & exists($$QT_BUILD_TREE/mkspecs/qmodule.pri)):QMAKE_QT_MODULE = $$QT_BUILD_TREE/mkspecs/qmodule.pri
!exists($$QMAKE_QT_MODULE):exists($$[QT_HOST_DATA]/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$[QT_HOST_DATA]/mkspecs/qmodule.pri
}
!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
!exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) {
error("Cannot load qmodule.pri!")
} else {
QMAKE_QT_MODULE_PRI_LOADED = 1
debug(1, "Loaded qmodule.pri from ($$QMAKE_QT_MODULE)")
}
} else {
QMAKE_QT_MODULE_PRI_LOADED = 1 # covers 'preloading' from .qmake.cache
debug(1, "Not loading qmodule.pri twice")
}
mac {
!isEmpty(QMAKE_RPATHDIR){
CONFIG += absolute_library_soname
}
}
# Qt modules get compiled without exceptions enabled by default
CONFIG += exceptions_off
#SIMD defines:
sse2:DEFINES += QT_COMPILER_SUPPORTS_SSE2
sse3:DEFINES += QT_COMPILER_SUPPORTS_SSE3
ssse3:DEFINES += QT_COMPILER_SUPPORTS_SSSE3
sse4_1:DEFINES += QT_COMPILER_SUPPORTS_SSE4_1
sse4_2:DEFINES += QT_COMPILER_SUPPORTS_SSE4_2
avx:DEFINES += QT_COMPILER_SUPPORTS_AVX
avx2:DEFINES += QT_COMPILER_SUPPORTS_AVX2
iwmmxt:DEFINES += QT_COMPILER_SUPPORTS_IWMMXT
neon:DEFINES += QT_COMPILER_SUPPORTS_NEON
mips_dsp:DEFINES += QT_COMPILER_SUPPORTS_MIPS_DSP
mips_dspr2:DEFINES += QT_COMPILER_SUPPORTS_MIPS_DSPR2