summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/default_pre.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/default_pre.prf')
-rw-r--r--mkspecs/features/default_pre.prf15
1 files changed, 15 insertions, 0 deletions
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index b06b9d6cfc..eb3281ea1d 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -7,3 +7,18 @@ CONFIG = \
lex yacc debug exceptions depend_includepath \
testcase_targets import_plugins import_qpa_plugin \
$$CONFIG
+
+!build_pass:defined(QT_EDITION, var):!equals(QT_EDITION, "OpenSource"):!equals(QT_EDITION, "Preview") {
+ #
+ # call license checker (but cache result for one day)
+ #
+ today = $$section(_DATE_, " ", 0, 2)
+ !isEqual(QMAKE_LICHECK_TIMESTAMP, $$today) {
+ !system("$$system_quote($$system_path($$[QT_HOST_BINS/src]/$$QT_LICHECK)) check" \
+ "$$QT_RELEASE_DATE $$[QMAKE_SPEC] $$[QMAKE_XSPEC]"): \
+ error("License check failed! Giving up ...")
+
+ cache(QMAKE_LICHECK_TIMESTAMP, set stash, today)
+ }
+ unset(today)
+}