summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-09-19 09:47:14 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-09-19 10:12:33 +0200
commitac8a82f5ffd08b0b9f8f76be29158ce7e113cb46 (patch)
tree1356da7c9861eb4be90d01d2e475d88e14352678
parent02759551f6f5aa0f365fecc4d880901e42908675 (diff)
Fix JasPer version checkv5.14.0-beta1v5.14.0-alpha1
The compile test for JasPer tried to check for a certain version number at run time, which is pointless, because we never run this test. Turn the run-time check into a compile-time check. Change-Id: I7c9de67a35edadf6a13b32b0faf48ac728a80fc0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/imageformats/configure.json11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/imageformats/configure.json b/src/imageformats/configure.json
index 4724d86..3b38fae 100644
--- a/src/imageformats/configure.json
+++ b/src/imageformats/configure.json
@@ -22,10 +22,15 @@
"string.h",
"jasper/jasper.h"
],
+ "head": [
+ "constexpr bool streq(const char *a, const char *b)",
+ "{",
+ " return a[0] == b[0] && (!a[0] || streq(a + 1, b + 1));",
+ "}"
+ ],
"main": [
- "// This version of Jasper is broken, according to the old Qt Solutions docs",
- "if (strcmp(JAS_VERSION, \"1.900.0\") == 0)",
- " return 1;"
+ "static_assert(!streq(JAS_VERSION, \"1.900.0\"),",
+ " \"JasPer version 1.900.0 is considered broken.\");"
]
},
"sources": [