89ef515177
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>
41 lines
1.3 KiB
Prolog
41 lines
1.3 KiB
Prolog
# This project is not actually used to build qmake, but to support development
|
|
# with Qt Creator. The real build system is made up by the Makefile templates
|
|
# and the configures.
|
|
|
|
option(host_build)
|
|
CONFIG += console bootstrap
|
|
CONFIG -= qt shared app_bundle uic
|
|
DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED \
|
|
PROEVALUATOR_FULL
|
|
DESTDIR = ../bin/
|
|
|
|
OBJECTS_DIR = .
|
|
MOC_DIR = .
|
|
|
|
#guts
|
|
VPATH += $$QT_SOURCE_TREE/src/corelib/global \
|
|
$$QT_SOURCE_TREE/src/corelib/tools \
|
|
$$QT_SOURCE_TREE/src/corelib/kernel \
|
|
$$QT_SOURCE_TREE/src/corelib/codecs \
|
|
$$QT_SOURCE_TREE/src/corelib/plugin \
|
|
$$QT_SOURCE_TREE/src/corelib/xml \
|
|
$$QT_SOURCE_TREE/src/corelib/io \
|
|
$$QT_SOURCE_TREE/src/corelib/json \
|
|
$$QT_SOURCE_TREE/tools/shared/windows
|
|
|
|
INCLUDEPATH += . \
|
|
library \
|
|
generators \
|
|
generators/unix \
|
|
generators/win32 \
|
|
generators/mac \
|
|
generators/integrity \
|
|
$$QT_SOURCE_TREE/include \
|
|
$$QT_SOURCE_TREE/include/QtCore \
|
|
$$QT_SOURCE_TREE/include/QtCore/$$QT_VERSION \
|
|
$$QT_SOURCE_TREE/include/QtCore/$$QT_VERSION/QtCore \
|
|
$$QT_SOURCE_TREE/tools/shared \
|
|
$$QT_SOURCE_TREE/qmake
|
|
|
|
include(qmake.pri)
|