summaryrefslogtreecommitdiffstats
path: root/configure.json
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-10-31 22:42:14 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-12-11 03:57:35 +0000
commitf25bc30d8d9d13fffd34213dfbf5e7373a18222a (patch)
treeb647201ffe2af97afd901ad09d47817270bb9968 /configure.json
parent163b5c02785c0462a31b9a3f5f05cda54e03de78 (diff)
QResource: add support for resources compressed with Zstandard
See next commit for details on why this is a good idea. [ChangeLog][Important Behavior Changes] The Qt resource system now supports compressing content using the Zstandard (https://zstd.net) algorithm. Compared to zlib, it compresses better for the same CPU time, so this algorithm is the default. QResource::isCompressed() returns true for either compression algorithm. Use QResource::compressionAlgorithm() to find out which algorithm to decompress. QFile will automatically decompress using the correct algorithm. Change-Id: I343f2beed55440a7ac0bfffd1562e9a8f94933a7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'configure.json')
-rw-r--r--configure.json26
1 files changed, 24 insertions, 2 deletions
diff --git a/configure.json b/configure.json
index e34a9cbad5..a2cc39d760 100644
--- a/configure.json
+++ b/configure.json
@@ -136,7 +136,8 @@
"Werror": { "type": "boolean", "name": "warnings_are_errors" },
"widgets": "boolean",
"xplatform": "string",
- "zlib": { "type": "enum", "name": "system-zlib", "values": { "system": "yes", "qt": "no" } }
+ "zlib": { "type": "enum", "name": "system-zlib", "values": { "system": "yes", "qt": "no" } },
+ "zstd": "boolean"
},
"prefix": {
"D": "defines",
@@ -167,6 +168,21 @@
{ "libs": "-s USE_ZLIB=1", "condition": "config.wasm" }
]
},
+ "zstd": {
+ "label": "Zstandard",
+ "test": {
+ "include": "zstd.h",
+ "main": [
+ "(void) ZSTD_compress(NULL, 0, NULL, 0, 1);",
+ "unsigned long long n = ZSTD_getFrameContentSize(NULL, 0);",
+ "(void) ZSTD_decompress(NULL, 0, NULL, n);"
+ ]
+ },
+ "sources": [
+ { "type": "pkgConfig", "args": "libzstd >= 1.3" },
+ "-lzstd"
+ ]
+ },
"dbus": {
"label": "D-Bus >= 1.2",
"test": {
@@ -1126,6 +1142,11 @@
"condition": "libs.zlib",
"output": [ "privateFeature" ]
},
+ "zstd": {
+ "label": "Zstandard support",
+ "condition": "libs.zstd",
+ "output": [ "privateFeature" ]
+ },
"thread": {
"label": "Thread support",
"purpose": "Provides QThread and related classes.",
@@ -1452,7 +1473,8 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5
"entries": [
"pkg-config",
"libudev",
- "system-zlib"
+ "system-zlib",
+ "zstd"
]
}
]