summaryrefslogtreecommitdiffstats
path: root/qmake/Makefile.win32
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2013-09-05 07:55:49 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-17 08:07:25 +0200
commit89ef515177fd5a0b5d95dcffd5fd0b0669e3625a (patch)
tree0fb87c82c882168141c1194dabbc47915f10eb98 /qmake/Makefile.win32
parentf47958fa148d6ea9ece0bec3ca9ba67d9c68ea19 (diff)
Add JSON parsing support to qmake.
Add qjson* implementation files from corelib/json to the qmake build. Add a read-only compile mode, enabled by defining QT_JSON_READONLY. Add qmake built-in function parseJson(file, into) which parses a json file into the given variable. qmake uses a flat key -> value-list implementation for storing variables, which means that some hackery is need to represent arbitrarily nested JSON. Use a special "_KEYS_" variable for arrays and objects: Arrays: ["item1", "item2"] $${array._KEYS_} -> 0 1 2 $${array.0} -> "item1" $${array.1} -> "item2" Objects: { "key1" : "value1", "key2" : "value2" } $${object._KEYS_} -> key1 key2 $${object.key1} -> value1 $${object.key2} -> value2 Change-Id: I0aa2e4e4ae14fa25be8242bc16d3cffce32504d2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'qmake/Makefile.win32')
-rw-r--r--qmake/Makefile.win3213
1 files changed, 11 insertions, 2 deletions
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 9a772d9760..c0d20111e9 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -41,7 +41,7 @@ CFLAGS_BARE = -c -Fo./ \
-DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \
-DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
- -DUNICODE -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1
+ -DUNICODE -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY
CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS) $(EXTRA_CPPFLAGS)
CXXFLAGS_BARE = $(CFLAGS_BARE)
@@ -120,7 +120,13 @@ QTOBJS= \
qxmlstream.obj \
qxmlutils.obj \
qnumeric.obj \
- qlogging.obj
+ qlogging.obj \
+ qjson.obj \
+ qjsondocument.obj \
+ qjsonparser.obj \
+ qjsonarray.obj \
+ qjsonobject.obj \
+ qjsonvalue.obj
first all: qmake.exe
@@ -207,5 +213,8 @@ qmake_pch.obj:
{$(SOURCE_PATH)\src\corelib\xml}.cpp{}.obj::
$(CXX) $(CXXFLAGS) $<
+{$(SOURCE_PATH)\src\corelib\json}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
+
{$(SOURCE_PATH)\tools\shared\windows}.cpp{}.obj::
$(CXX) $(CXXFLAGS) $<