# Main projectfile
#####################################################################
-CONFIG += ordered
-TEMPLATE = subdirs
+load(qt_parts)
cross_compile: CONFIG += nostrip
-module_qtbase_tests.subdir = tests
-module_qtbase_tests.target = module-qtbase-tests
-module_qtbase_tests.depends = module_qtbase_src
-module_qtbase_tests.CONFIG = no_default_install
-
-#process the projects
-PROJECTS=$$eval($$list($$lower($$unique(QT_BUILD_PARTS))))
-# note that the order matters for these blocks!
-contains(PROJECTS, qmake) {
- PROJECTS -= qmake
- # nothing to be done
-}
-contains(PROJECTS, libs) {
- PROJECTS -= libs
- include(src/src.pro)
-}
-contains(PROJECTS, examples) {
- PROJECTS -= examples
- SUBDIRS += examples
-}
-contains(PROJECTS, tests) {
- PROJECTS -= tests
- SUBDIRS += module_qtbase_tests
-}
-!isEmpty(PROJECTS) {
- message(Unknown PROJECTS: $$PROJECTS)
-}
-
confclean.depends += clean
confclean.commands =
unix {
(cd config.tests/x11/xinput && $(MAKE) distclean); \
(cd config.tests/x11/fontconfig && $(MAKE) distclean); \
(cd config.tests/x11/xinerama && $(MAKE) distclean); \
- (cd config.tests/x11/sm && $(MAKE) distclean); \
(cd config.tests/x11/xshape && $(MAKE) distclean); \
(cd config.tests/x11/opengl && $(MAKE) distclean); \
$(DEL_FILE) config.tests/.qmake.cache; \
$(DEL_FILE) src/corelib/global/qconfig.h; \
$(DEL_FILE) src/corelib/global/qconfig.cpp; \
$(DEL_FILE) mkspecs/qconfig.pri; \
+ $(DEL_FILE) mkspecs/qdevice.pri; \
$(DEL_FILE) mkspecs/qmodule.pri; \
$(DEL_FILE) .qmake.cache; \
(cd qmake && $(MAKE) distclean);
confclean.commands += -$(DEL_FILE) src\\corelib\\global\\qconfig.h $$escape_expand(\\n\\t) \
-$(DEL_FILE) src\\corelib\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
-$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
+ -$(DEL_FILE) mkspecs\\qdevice.pri $$escape_expand(\\n\\t) \
-$(DEL_FILE) mkspecs\\qmodule.pri $$escape_expand(\\n\\t) \
-$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
(cd qmake && $(MAKE) distclean)
#qmake
qmake.path = $$[QT_HOST_BINS]
win32 {
- qmake.files=$$QT_BUILD_TREE/bin/qmake.exe
+ qmake.files = $$OUT_PWD/bin/qmake.exe
} else {
- qmake.files=$$QT_BUILD_TREE/bin/qmake
+ qmake.files = $$OUT_PWD/bin/qmake
}
INSTALLS += qmake
#syncqt
syncqt.path = $$[QT_HOST_BINS]
-syncqt.files=$$QT_BUILD_TREE/bin/syncqt
-win32:syncqt.files=$$QT_BUILD_TREE/bin/syncqt.bat
+syncqt.files = $$OUT_PWD/bin/syncqt
+win32:syncqt.files = $$OUT_PWD/bin/syncqt.bat
INSTALLS += syncqt
#qtmodule-configtests
configtests.path = $$[QT_HOST_BINS]
-configtests.files=$$QT_BUILD_TREE/bin/qtmodule-configtests
+configtests.files = $$PWD/bin/qtmodule-configtests
INSTALLS += configtests
#mkspecs
mkspecs.path = $$[QT_HOST_DATA]/mkspecs
-mkspecs.files=$$QT_BUILD_TREE/mkspecs/qconfig.pri $$QT_BUILD_TREE/mkspecs/qmodule.pri $$files($$QT_SOURCE_TREE/mkspecs/*)
-mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/modules
-unix {
- DEFAULT_QMAKESPEC = $$QMAKESPEC
- DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
- mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
- mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/default
+mkspecs.files = \
+ $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri $$OUT_PWD/mkspecs/qdevice.pri \
+ $$files($$PWD/mkspecs/*) # $$OUT_PWD contains only symlinks under Unix
+mkspecs.files -= $$PWD/mkspecs/modules
+!equals(OUT_PWD, $$PWD) {
+ # When shadow building, the default mkspecs only exist in the build tree.
+ mkspecs.files += $$OUT_PWD/mkspecs/default-host $$OUT_PWD/mkspecs/default
}
-win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) {
- # When shadow building on Windows, the default mkspec only exists in the build tree.
- mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
+!equals(QMAKE_HOST.os, Linux):!equals(QMAKE_HOST.os, Windows) {
+ # MacOS' (and maybe other Unixes') cp command is too daft to honor -f when copying symlinks.
+ mkspecs_pre.commands = rm -f $$[QT_HOST_DATA]/mkspecs/default-host $$[QT_HOST_DATA]/mkspecs/default
+ QMAKE_EXTRA_TARGETS += mkspecs_pre
+ mkspecs.depends += mkspecs_pre
}
INSTALLS += mkspecs