mirror of https://github.com/qt/qtbase.git
Add Qt Widgets opt out support to build system
There should be a clear QWidget free path for people with no interest in legacy QWidget functionality. Adding this option to configure makes this path readily accessible and hence testable. Change-Id: If87c1063fcf4c46f5280836126c11999feaa9f8a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
7ae2ea5426
commit
0738c38f0e
|
@ -651,6 +651,7 @@ CFG_CONFIGURE_EXIT_ON_ERROR=yes
|
||||||
CFG_PROFILE=no
|
CFG_PROFILE=no
|
||||||
CFG_EXCEPTIONS=unspecified
|
CFG_EXCEPTIONS=unspecified
|
||||||
CFG_GUI=auto # (yes|no|auto)
|
CFG_GUI=auto # (yes|no|auto)
|
||||||
|
CFG_WIDGETS=yes
|
||||||
CFG_QCONFIG=full
|
CFG_QCONFIG=full
|
||||||
CFG_DEBUG=auto
|
CFG_DEBUG=auto
|
||||||
CFG_MYSQL_CONFIG=
|
CFG_MYSQL_CONFIG=
|
||||||
|
@ -1712,6 +1713,15 @@ while [ "$#" -gt 0 ]; do
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
widgets)
|
||||||
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
|
||||||
|
CFG_WIDGETS="yes"
|
||||||
|
elif [ "$VAL" = "no" ]; then
|
||||||
|
CFG_WIDGETS="no"
|
||||||
|
else
|
||||||
|
UNKNOWN_OPT=yes
|
||||||
|
fi
|
||||||
|
;;
|
||||||
dbus)
|
dbus)
|
||||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
|
||||||
CFG_DBUS="$VAL"
|
CFG_DBUS="$VAL"
|
||||||
|
@ -5602,8 +5612,12 @@ if [ "$CFG_GUI" = "auto" ]; then
|
||||||
fi
|
fi
|
||||||
if [ "$CFG_GUI" = "no" ]; then
|
if [ "$CFG_GUI" = "no" ]; then
|
||||||
QT_CONFIG="$QT_CONFIG no-gui"
|
QT_CONFIG="$QT_CONFIG no-gui"
|
||||||
|
CFG_WIDGETS="no"
|
||||||
|
fi
|
||||||
|
if [ "$CFG_WIDGETS" = "no" ]; then
|
||||||
|
QT_CONFIG="$QT_CONFIG no-widgets"
|
||||||
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
|
if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
|
||||||
#On Mac we implicitly link against libz, so we
|
#On Mac we implicitly link against libz, so we
|
||||||
|
@ -6473,6 +6487,7 @@ fi
|
||||||
[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
|
[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
|
||||||
echo "QtConcurrent code ...... $CFG_CONCURRENT"
|
echo "QtConcurrent code ...... $CFG_CONCURRENT"
|
||||||
echo "QtGui module ........... $CFG_GUI"
|
echo "QtGui module ........... $CFG_GUI"
|
||||||
|
echo "QtWidgets module ....... $CFG_WIDGETS"
|
||||||
if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
|
if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
|
||||||
echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
|
echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
|
||||||
else
|
else
|
||||||
|
|
|
@ -2,7 +2,7 @@ TEMPLATE = subdirs
|
||||||
|
|
||||||
SUBDIRS *= sqldrivers bearer
|
SUBDIRS *= sqldrivers bearer
|
||||||
!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats
|
!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats
|
||||||
!isEmpty(QT.widgets.name): SUBDIRS += accessible
|
!contains(QT_CONFIG, no-widgets): SUBDIRS += accessible
|
||||||
|
|
||||||
SUBDIRS += platforms platforminputcontexts generic
|
SUBDIRS += platforms platforminputcontexts generic
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ src_concurrent.target = sub-concurrent
|
||||||
src_plugins.depends = src_gui src_sql src_xml src_platformsupport
|
src_plugins.depends = src_gui src_sql src_xml src_platformsupport
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contains(QT_CONFIG, no-widgets): SRC_SUBDIRS -= src_opengl src_widgets src_printsupport src_testlib
|
||||||
|
|
||||||
# This creates a sub-src rule
|
# This creates a sub-src rule
|
||||||
sub_src_target.CONFIG = recursive
|
sub_src_target.CONFIG = recursive
|
||||||
|
|
|
@ -198,6 +198,7 @@ Configure::Configure(int& argc, char** argv)
|
||||||
dictionary[ "NOPROCESS" ] = "no";
|
dictionary[ "NOPROCESS" ] = "no";
|
||||||
dictionary[ "STL" ] = "yes";
|
dictionary[ "STL" ] = "yes";
|
||||||
dictionary[ "EXCEPTIONS" ] = "yes";
|
dictionary[ "EXCEPTIONS" ] = "yes";
|
||||||
|
dictionary[ "WIDGETS" ] = "yes";
|
||||||
dictionary[ "RTTI" ] = "yes";
|
dictionary[ "RTTI" ] = "yes";
|
||||||
dictionary[ "MMX" ] = "auto";
|
dictionary[ "MMX" ] = "auto";
|
||||||
dictionary[ "3DNOW" ] = "auto";
|
dictionary[ "3DNOW" ] = "auto";
|
||||||
|
@ -771,6 +772,11 @@ void Configure::parseCmdLine()
|
||||||
else if (configCmdLine.at(i) == "-no-exceptions")
|
else if (configCmdLine.at(i) == "-no-exceptions")
|
||||||
dictionary[ "EXCEPTIONS" ] = "no";
|
dictionary[ "EXCEPTIONS" ] = "no";
|
||||||
|
|
||||||
|
else if (configCmdLine.at(i) == "-widgets")
|
||||||
|
dictionary[ "WIDGETS" ] = "yes";
|
||||||
|
else if (configCmdLine.at(i) == "-no-widgets")
|
||||||
|
dictionary[ "WIDGETS" ] = "no";
|
||||||
|
|
||||||
else if (configCmdLine.at(i) == "-rtti")
|
else if (configCmdLine.at(i) == "-rtti")
|
||||||
dictionary[ "RTTI" ] = "yes";
|
dictionary[ "RTTI" ] = "yes";
|
||||||
else if (configCmdLine.at(i) == "-no-rtti")
|
else if (configCmdLine.at(i) == "-no-rtti")
|
||||||
|
@ -1462,7 +1468,7 @@ bool Configure::displayHelp()
|
||||||
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
|
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
|
||||||
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
|
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
|
||||||
"[-no-webkit] [-webkit] [-webkit-debug]\n"
|
"[-no-webkit] [-webkit] [-webkit-debug]\n"
|
||||||
"[-no-directwrite] [-directwrite] [-qpa]\n\n", 0, 7);
|
"[-no-directwrite] [-directwrite] [-qpa] [-no-widgets] \n\n", 0, 7);
|
||||||
|
|
||||||
desc("Installation options:\n\n");
|
desc("Installation options:\n\n");
|
||||||
|
|
||||||
|
@ -1496,6 +1502,8 @@ bool Configure::displayHelp()
|
||||||
desc("EXCEPTIONS", "no", "-no-exceptions", "Disable exceptions on platforms that support it.");
|
desc("EXCEPTIONS", "no", "-no-exceptions", "Disable exceptions on platforms that support it.");
|
||||||
desc("EXCEPTIONS", "yes","-exceptions", "Enable exceptions on platforms that support it.\n");
|
desc("EXCEPTIONS", "yes","-exceptions", "Enable exceptions on platforms that support it.\n");
|
||||||
|
|
||||||
|
desc("WIDGETS", "no", "-no-widgets", "Disable QtWidgets module\n");
|
||||||
|
|
||||||
desc("ACCESSIBILITY", "no", "-no-accessibility", "Do not compile Windows Active Accessibility support.");
|
desc("ACCESSIBILITY", "no", "-no-accessibility", "Do not compile Windows Active Accessibility support.");
|
||||||
desc("ACCESSIBILITY", "yes", "-accessibility", "Compile Windows Active Accessibility support.\n");
|
desc("ACCESSIBILITY", "yes", "-accessibility", "Compile Windows Active Accessibility support.\n");
|
||||||
|
|
||||||
|
@ -2097,6 +2105,9 @@ void Configure::generateOutputVars()
|
||||||
qtConfig += "release";
|
qtConfig += "release";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dictionary[ "WIDGETS" ] == "no")
|
||||||
|
qtConfig += "no-widgets";
|
||||||
|
|
||||||
// Compression --------------------------------------------------
|
// Compression --------------------------------------------------
|
||||||
if (dictionary[ "ZLIB" ] == "qt")
|
if (dictionary[ "ZLIB" ] == "qt")
|
||||||
qtConfig += "zlib";
|
qtConfig += "zlib";
|
||||||
|
@ -2804,6 +2815,7 @@ void Configure::generateConfigfiles()
|
||||||
|
|
||||||
if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY";
|
if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY";
|
||||||
if (dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS";
|
if (dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS";
|
||||||
|
if (dictionary["WIDGETS"] == "no") qconfigList += "QT_NO_WIDGETS";
|
||||||
if (dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL";
|
if (dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL";
|
||||||
if (dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG";
|
if (dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG";
|
||||||
if (dictionary["OPENSSL"] == "no") {
|
if (dictionary["OPENSSL"] == "no") {
|
||||||
|
@ -3038,6 +3050,7 @@ void Configure::displayConfig()
|
||||||
cout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl;
|
cout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl;
|
||||||
cout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl;
|
cout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl;
|
||||||
cout << "QtDBus support.............." << dictionary[ "DBUS" ] << endl;
|
cout << "QtDBus support.............." << dictionary[ "DBUS" ] << endl;
|
||||||
|
cout << "QtWidgets module support...." << dictionary[ "WIDGETS" ] << endl;
|
||||||
cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl;
|
cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl;
|
||||||
cout << "DirectWrite support........." << dictionary[ "DIRECTWRITE" ] << endl << endl;
|
cout << "DirectWrite support........." << dictionary[ "DIRECTWRITE" ] << endl << endl;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue