summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-10-11 14:17:54 +0200
committerLars Knoll <lars.knoll@qt.io>2016-10-11 14:20:24 +0000
commit5574a814ff7d4932c817618c34e80f3c61887e26 (patch)
treee0082c9b59b8cf4cec7fbc14c010225ccdfb25cb
parent93178d26f8dd64d5ec1880b79a2906247a3c308b (diff)
Add configure feature for QCommandLineParser
Change-Id: I78c1159d29e12ad03b9a3c076a40ee533958af8a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--src/corelib/configure.json6
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h4
-rw-r--r--src/corelib/tools/qcommandlineoption.h2
-rw-r--r--src/corelib/tools/qcommandlineparser.h2
-rw-r--r--src/corelib/tools/tools.pri13
5 files changed, 22 insertions, 5 deletions
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index b911e08b64..238002c150 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -570,6 +570,12 @@
"purpose": "Provides support for timezone handling.",
"section": "Utilities",
"output": [ "publicFeature" ]
+ },
+ "commandlineparser": {
+ "label": "QCommandlineParser",
+ "purpose": "Provides support for command line parsing.",
+ "section": "Utilities",
+ "output": [ "publicFeature" ]
}
},
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index f482c6b8f6..76e4e98a74 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -79,14 +79,16 @@
#define QT_NO_GEOM_VARIANT
#if defined(QT_BUILD_QMAKE) || defined(QT_BUILD_CONFIGURE)
+#define QT_FEATURE_commandlineparser -1
#define QT_NO_COMPRESS
#define QT_JSON_READONLY
#define QT_NO_TEXTCODEC
#define QT_FEATURE_textcodec -1
#else
-#define QT_FEATURE_textcodec 1
#define QT_NO_CODECS
#define QT_FEATURE_codecs -1
+#define QT_FEATURE_commandlineparser 1
+#define QT_FEATURE_textcodec 1
#endif
#if defined(QT_BUILD_QMAKE)
diff --git a/src/corelib/tools/qcommandlineoption.h b/src/corelib/tools/qcommandlineoption.h
index 6ebaab3d48..4dcae03ad9 100644
--- a/src/corelib/tools/qcommandlineoption.h
+++ b/src/corelib/tools/qcommandlineoption.h
@@ -43,6 +43,8 @@
#include <QtCore/qstringlist.h>
#include <QtCore/qshareddata.h>
+QT_REQUIRE_CONFIG(commandlineparser);
+
QT_BEGIN_NAMESPACE
class QCommandLineOptionPrivate;
diff --git a/src/corelib/tools/qcommandlineparser.h b/src/corelib/tools/qcommandlineparser.h
index 51bab66ca7..4584c384cc 100644
--- a/src/corelib/tools/qcommandlineparser.h
+++ b/src/corelib/tools/qcommandlineparser.h
@@ -45,6 +45,8 @@
#include <QtCore/qcoreapplication.h>
#include <QtCore/qcommandlineoption.h>
+QT_REQUIRE_CONFIG(commandlineparser);
+
QT_BEGIN_NAMESPACE
class QCommandLineParserPrivate;
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 2a203df4b8..47b0b2d4be 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -15,8 +15,6 @@ HEADERS += \
tools/qbytedata_p.h \
tools/qcache.h \
tools/qchar.h \
- tools/qcommandlineoption.h \
- tools/qcommandlineparser.h \
tools/qcollator.h \
tools/qcollator_p.h \
tools/qcontainerfwd.h \
@@ -82,8 +80,6 @@ SOURCES += \
tools/qbytearraylist.cpp \
tools/qbytearraymatcher.cpp \
tools/qcollator.cpp \
- tools/qcommandlineoption.cpp \
- tools/qcommandlineparser.cpp \
tools/qcryptographichash.cpp \
tools/qdatetime.cpp \
tools/qdatetimeparser.cpp \
@@ -184,6 +180,15 @@ qtConfig(regularexpression) {
SOURCES += tools/qregularexpression.cpp
}
+qtConfig(commandlineparser) {
+ HEADERS += \
+ tools/qcommandlineoption.h \
+ tools/qcommandlineparser.h
+ SOURCES += \
+ tools/qcommandlineoption.cpp \
+ tools/qcommandlineparser.cpp
+}
+
INCLUDEPATH += ../3rdparty/harfbuzz/src
HEADERS += ../3rdparty/harfbuzz/src/harfbuzz.h
SOURCES += ../3rdparty/harfbuzz/src/harfbuzz-buffer.c \