From 1216f596bdb776da24851111cec764e04105bd62 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 8 Jun 2017 14:30:33 +0200 Subject: make qconfig.pri export QT__VERSION variables again ... and rename those determined by toolchain.prf to QMAKE_* (this was already the case for the newly introduced msvc and icc variables). this restores the ability for user projects to query the toolchain qt itself was built with, which is necessary for compatibility checks. in fact, we may do such validation in toolchain.prf itself at a later point. Change-Id: I35f4c393c5e4e0fe987c0844714b7a8f8687c24e Reviewed-by: Joerg Bornemann --- configure.pri | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'configure.pri') diff --git a/configure.pri b/configure.pri index 673252dc51..7d719e6797 100644 --- a/configure.pri +++ b/configure.pri @@ -1064,6 +1064,37 @@ defineReplace(qtConfOutputPostProcess_publicPro) { !isEmpty(config.input.qt_libinfix): output += "QT_LIBINFIX = $$config.input.qt_libinfix" !isEmpty(config.input.qt_namespace): output += "QT_NAMESPACE = $$config.input.qt_namespace" + !isEmpty(QMAKE_GCC_MAJOR_VERSION) { + output += \ + "QT_GCC_MAJOR_VERSION = $$QMAKE_GCC_MAJOR_VERSION" \ + "QT_GCC_MINOR_VERSION = $$QMAKE_GCC_MINOR_VERSION" \ + "QT_GCC_PATCH_VERSION = $$QMAKE_GCC_PATCH_VERSION" + } + !isEmpty(QMAKE_CLANG_MAJOR_VERSION) { + output += \ + "QT_CLANG_MAJOR_VERSION = $$QMAKE_CLANG_MAJOR_VERSION" \ + "QT_CLANG_MINOR_VERSION = $$QMAKE_CLANG_MINOR_VERSION" \ + "QT_CLANG_PATCH_VERSION = $$QMAKE_CLANG_PATCH_VERSION" + } + !isEmpty(QMAKE_APPLE_CLANG_MAJOR_VERSION) { + output += \ + "QT_APPLE_CLANG_MAJOR_VERSION = $$QMAKE_APPLE_CLANG_MAJOR_VERSION" \ + "QT_APPLE_CLANG_MINOR_VERSION = $$QMAKE_APPLE_CLANG_MINOR_VERSION" \ + "QT_APPLE_CLANG_PATCH_VERSION = $$QMAKE_APPLE_CLANG_PATCH_VERSION" + } + !isEmpty(QMAKE_MSC_VER) { + output += \ + "QT_MSVC_MAJOR_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\1")" \ + "QT_MSVC_MINOR_VERSION = $$format_number($$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\2"))" \ + "QT_MSVC_PATCH_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\3")" + } + !isEmpty(QMAKE_ICC_VER) { + output += \ + "QT_ICC_MAJOR_VERSION = $$replace(QMAKE_ICC_VER, "(..)(..)", "\\1")" \ + "QT_ICC_MINOR_VERSION = $$format_number($$replace(QMAKE_ICC_VER, "(..)(..)", "\\2"))" \ + "QT_ICC_PATCH_VERSION = $$QMAKE_ICC_UPDATE_VER" + } + output += "QT_EDITION = $$config.input.qt_edition" !contains(config.input.qt_edition, "(OpenSource|Preview)") { output += \ -- cgit v1.2.3