2011-04-27 10:05:43 +00:00
|
|
|
#####################################################################
|
|
|
|
# Main projectfile
|
|
|
|
#####################################################################
|
|
|
|
|
2012-07-03 19:26:36 +00:00
|
|
|
load(qt_parts)
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-06-13 18:42:07 +00:00
|
|
|
SUBDIRS += qmake/qmake-docs.pro
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
cross_compile: CONFIG += nostrip
|
|
|
|
|
2012-01-23 20:25:30 +00:00
|
|
|
confclean.depends += clean
|
2011-04-27 10:05:43 +00:00
|
|
|
confclean.commands =
|
2012-01-23 20:25:30 +00:00
|
|
|
unix {
|
2011-04-27 10:05:43 +00:00
|
|
|
confclean.commands += (cd config.tests/unix/stl && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/ptrsize && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/x11/notype && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/getaddrinfo && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/cups && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/psql && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/mysql && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/mysql_r && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/nis && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/iodbc && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/odbc && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/oci && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/tds && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/db2 && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/ibase && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/ipv6ifname && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/zlib && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/sqlite2 && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/libjpeg && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/unix/libpng && $(MAKE) distclean); \
|
2012-09-18 18:15:18 +00:00
|
|
|
(cd config.tests/unix/slog2 && $(MAKE) distclean); \
|
2014-01-29 12:43:03 +00:00
|
|
|
(cd config.tests/unix/lgmon && $(MAKE) distclean); \
|
2011-04-27 10:05:43 +00:00
|
|
|
(cd config.tests/x11/xcursor && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/x11/xrender && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/x11/xrandr && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/x11/xkb && $(MAKE) distclean); \
|
|
|
|
(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/xshape && $(MAKE) distclean); \
|
|
|
|
(cd config.tests/x11/opengl && $(MAKE) distclean); \
|
|
|
|
$(DEL_FILE) config.tests/.qmake.cache; \
|
2011-05-10 18:39:35 +00:00
|
|
|
$(DEL_FILE) src/corelib/global/qconfig.h; \
|
|
|
|
$(DEL_FILE) src/corelib/global/qconfig.cpp; \
|
2011-04-27 10:05:43 +00:00
|
|
|
$(DEL_FILE) mkspecs/qconfig.pri; \
|
2012-03-20 21:02:21 +00:00
|
|
|
$(DEL_FILE) mkspecs/qdevice.pri; \
|
2011-11-22 06:58:30 +00:00
|
|
|
$(DEL_FILE) mkspecs/qmodule.pri; \
|
2011-04-27 10:05:43 +00:00
|
|
|
$(DEL_FILE) .qmake.cache; \
|
|
|
|
(cd qmake && $(MAKE) distclean);
|
|
|
|
}
|
|
|
|
win32 {
|
2011-05-10 18:39:35 +00:00
|
|
|
confclean.commands += -$(DEL_FILE) src\\corelib\\global\\qconfig.h $$escape_expand(\\n\\t) \
|
|
|
|
-$(DEL_FILE) src\\corelib\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
|
2011-04-27 10:05:43 +00:00
|
|
|
-$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
|
2012-03-20 21:02:21 +00:00
|
|
|
-$(DEL_FILE) mkspecs\\qdevice.pri $$escape_expand(\\n\\t) \
|
2011-11-22 06:58:30 +00:00
|
|
|
-$(DEL_FILE) mkspecs\\qmodule.pri $$escape_expand(\\n\\t) \
|
2011-04-27 10:05:43 +00:00
|
|
|
-$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
|
|
|
|
(cd qmake && $(MAKE) distclean)
|
|
|
|
}
|
|
|
|
QMAKE_EXTRA_TARGETS += confclean
|
|
|
|
qmakeclean.commands += (cd qmake && $(MAKE) clean)
|
|
|
|
QMAKE_EXTRA_TARGETS += qmakeclean
|
|
|
|
CLEAN_DEPS += qmakeclean
|
|
|
|
|
|
|
|
CONFIG -= qt
|
|
|
|
|
|
|
|
### installations ####
|
|
|
|
|
|
|
|
#qmake
|
2012-02-28 19:57:38 +00:00
|
|
|
qmake.path = $$[QT_HOST_BINS]
|
2012-07-16 16:23:33 +00:00
|
|
|
equals(QMAKE_HOST.os, Windows) {
|
2012-03-02 20:32:02 +00:00
|
|
|
qmake.files = $$OUT_PWD/bin/qmake.exe
|
2011-04-27 10:05:43 +00:00
|
|
|
} else {
|
2012-03-02 20:32:02 +00:00
|
|
|
qmake.files = $$OUT_PWD/bin/qmake
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
INSTALLS += qmake
|
|
|
|
|
2011-04-07 14:40:33 +00:00
|
|
|
#syncqt
|
2012-02-28 19:57:38 +00:00
|
|
|
syncqt.path = $$[QT_HOST_BINS]
|
2013-05-10 16:21:27 +00:00
|
|
|
syncqt.files = $$PWD/bin/syncqt.pl
|
2011-04-07 14:40:33 +00:00
|
|
|
INSTALLS += syncqt
|
|
|
|
|
2013-02-07 15:32:30 +00:00
|
|
|
# If we are doing a prefix build, create a "module" pri which enables
|
|
|
|
# qtPrepareTool() to find the non-installed syncqt.
|
2013-05-14 08:44:57 +00:00
|
|
|
prefix_build|!equals(PWD, $$OUT_PWD) {
|
2013-02-07 15:32:30 +00:00
|
|
|
|
2014-04-29 18:15:21 +00:00
|
|
|
cmd = perl -w $$system_path($$PWD/bin/syncqt.pl)
|
2013-02-07 15:32:30 +00:00
|
|
|
|
|
|
|
TOOL_PRI = $$OUT_PWD/mkspecs/modules/qt_tool_syncqt.pri
|
|
|
|
|
2013-06-13 15:28:52 +00:00
|
|
|
TOOL_PRI_CONT = "QT_TOOL.syncqt.binary = $$val_escape(cmd)"
|
2013-02-07 15:32:30 +00:00
|
|
|
write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
|
|
|
|
|
|
|
|
# Then, inject the new tool into the current cache state
|
|
|
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
|
|
|
|
added = $$TOOL_PRI
|
|
|
|
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
|
|
|
|
}
|
|
|
|
include($$TOOL_PRI)
|
2013-06-13 15:28:52 +00:00
|
|
|
cache(QT_TOOL.syncqt.binary, transient)
|
2013-02-07 15:32:30 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-10-23 13:24:03 +00:00
|
|
|
# Generate qfeatures.h
|
|
|
|
features =
|
|
|
|
lines = $$cat("src/corelib/global/qfeatures.txt", lines)
|
|
|
|
for (line, lines) {
|
|
|
|
t = $$replace(line, "^Feature: (\\S+)\\s*$", "\\1")
|
|
|
|
!isEqual(t, $$line) {
|
|
|
|
feature = $$t
|
|
|
|
features += $$t
|
|
|
|
} else {
|
|
|
|
t = $$replace(line, "^Requires: (.*)$", "\\1")
|
|
|
|
!isEqual(t, $$line) {
|
|
|
|
features.$${feature}.depends = $$replace(t, \\s+$, )
|
|
|
|
} else {
|
|
|
|
t = $$replace(line, "^Name: (.*)$", "\\1")
|
|
|
|
!isEqual(t, $$line) {
|
|
|
|
features.$${feature}.name = $$replace(t, \\s+$, )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
features = $$sort_depends(features, features.)
|
|
|
|
features = $$reverse(features)
|
|
|
|
FEATURES_H = \
|
|
|
|
"/*" \
|
2013-10-24 18:54:49 +00:00
|
|
|
" * All feature dependencies." \
|
2013-10-23 13:24:03 +00:00
|
|
|
" *" \
|
|
|
|
" * This list is generated by qmake from <qtbase>/src/corelib/global/qfeatures.txt" \
|
|
|
|
" */"
|
2013-10-28 20:59:17 +00:00
|
|
|
FEATURES_PRI =
|
2013-10-23 13:24:03 +00:00
|
|
|
for (ft, features) {
|
2013-10-24 18:54:49 +00:00
|
|
|
!isEmpty(features.$${ft}.depends) {
|
2013-10-23 13:24:03 +00:00
|
|
|
FEATURES_H += \
|
|
|
|
"$${LITERAL_HASH}if !defined(QT_NO_$$ft) && ($$join($$list($$split(features.$${ft}.depends)), ") || defined(QT_NO_", "defined(QT_NO_", ")"))" \
|
|
|
|
"$${LITERAL_HASH} define QT_NO_$$ft" \
|
|
|
|
"$${LITERAL_HASH}endif"
|
2013-10-28 20:59:17 +00:00
|
|
|
FEATURES_PRI += \
|
|
|
|
"contains(QT_DISABLED_FEATURES, "^($$lower($$join($$list($$replace(features.$${ft}.depends, _, -)), "|")))$"): \\" \
|
|
|
|
" QT_DISABLED_FEATURES += $$lower($$replace(ft, _, -))"
|
2013-10-23 13:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
write_file($$OUT_PWD/src/corelib/global/qfeatures.h, FEATURES_H)|error("Aborting.")
|
|
|
|
# Create forwarding header
|
|
|
|
FWD_FEATURES_H = \
|
|
|
|
'$${LITERAL_HASH}include "../../src/corelib/global/qfeatures.h"'
|
|
|
|
write_file($$OUT_PWD/include/QtCore/qfeatures.h, FWD_FEATURES_H)|error("Aborting.")
|
|
|
|
|
2013-10-28 20:59:17 +00:00
|
|
|
no_features =
|
2013-10-25 19:04:35 +00:00
|
|
|
lines = $$cat($$absolute_path($$QT_QCONFIG_PATH, $$PWD/src/corelib/global), lines)
|
|
|
|
for (line, lines) {
|
|
|
|
# We ignore all defines that don't follow the #ifndef + indent pattern.
|
|
|
|
# This makes it possible to have unchecked defines which are no features.
|
|
|
|
t = $$replace(line, "^$${LITERAL_HASH} define QT_NO_(\\S+)\\s*$", "\\1")
|
|
|
|
!isEqual(t, $$line) {
|
|
|
|
isEmpty(features.$${t}.name): \
|
|
|
|
error("$$QT_QCONFIG_PATH disables unknown feature $$t")
|
2013-10-28 20:59:17 +00:00
|
|
|
no_features += $$t
|
2013-10-25 19:04:35 +00:00
|
|
|
}
|
|
|
|
}
|
2013-10-28 20:59:17 +00:00
|
|
|
for (def, QT_NO_DEFINES) {
|
|
|
|
!isEmpty(features.$${def}.name): \
|
|
|
|
no_features += $$def
|
|
|
|
}
|
|
|
|
no_features = $$unique(no_features)
|
|
|
|
|
|
|
|
# Can't simply add these to QT_CONFIG, as e.g., contains(QT_CONFIG, accessibility) matches no-accessibililty.
|
|
|
|
FEATURES_PRI = \
|
|
|
|
"$${LITERAL_HASH} Features disabled by configure:" \
|
|
|
|
"QT_DISABLED_FEATURES =$$lower($$join($$list($$replace(no_features, _, -)), " ", " "))" \
|
|
|
|
"$$escape_expand(\\n)$${LITERAL_HASH} Dependencies derived from <qtbase>/src/corelib/global/qfeatures.txt:" \
|
2013-11-01 16:20:18 +00:00
|
|
|
$$FEATURES_PRI \
|
|
|
|
"QT_DISABLED_FEATURES = \$\$unique(QT_DISABLED_FEATURES)"
|
2013-10-28 20:59:17 +00:00
|
|
|
write_file($$OUT_PWD/mkspecs/qfeatures.pri, FEATURES_PRI)|error("Aborting.")
|
2013-10-25 19:04:35 +00:00
|
|
|
|
2014-02-03 20:19:48 +00:00
|
|
|
# Create forwarding headers for qconfig.h
|
|
|
|
FWD_QCONFIG_H = \
|
|
|
|
'$${LITERAL_HASH}include "../../src/corelib/global/qconfig.h"'
|
|
|
|
write_file($$OUT_PWD/include/QtCore/qconfig.h, FWD_QCONFIG_H)|error("Aborting.")
|
|
|
|
FWD_QTCONFIG = \
|
|
|
|
'$${LITERAL_HASH}include "qconfig.h"'
|
|
|
|
write_file($$OUT_PWD/include/QtCore/QtConfig, FWD_QTCONFIG)|error("Aborting.")
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#mkspecs
|
2012-02-28 19:57:38 +00:00
|
|
|
mkspecs.path = $$[QT_HOST_DATA]/mkspecs
|
2012-07-02 10:29:12 +00:00
|
|
|
mkspecs.files = \
|
2013-11-18 16:32:55 +00:00
|
|
|
$$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri $$OUT_PWD/mkspecs/qdevice.pri $$OUT_PWD/mkspecs/qfeatures.pri \
|
2013-05-08 14:29:11 +00:00
|
|
|
$$files($$PWD/mkspecs/*)
|
2013-11-26 16:02:59 +00:00
|
|
|
mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst
|
2011-04-27 10:05:43 +00:00
|
|
|
INSTALLS += mkspecs
|
2012-02-08 06:36:42 +00:00
|
|
|
|
2012-10-08 15:19:14 +00:00
|
|
|
global_docs.files = $$PWD/doc/global
|
|
|
|
global_docs.path = $$[QT_INSTALL_DOCS]
|
|
|
|
INSTALLS += global_docs
|
|
|
|
|
2012-02-08 06:36:42 +00:00
|
|
|
OTHER_FILES += \
|
|
|
|
configure \
|
|
|
|
header.BSD \
|
|
|
|
header.FDL \
|
|
|
|
header.LGPL \
|
|
|
|
header.LGPL-ONLY \
|
|
|
|
sync.profile
|