summaryrefslogtreecommitdiffstats
path: root/qmake/CMakeLists.txt
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2023-01-13 10:53:43 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2023-01-18 13:21:05 +0100
commit98a3634299e29104dee391145728dbad9797d7b3 (patch)
tree37f18ec26b5440148f2f9910ae016d86996adf26 /qmake/CMakeLists.txt
parentb71169005983f6eb9ac2e6eeb25533bf72a715d7 (diff)
Make qmake and qtpaths report Qt version baked into the binaries
QMake and qtpaths used qVersion() to report Qt's version number. This is problematic if those tools are run in an environment where a different Qt version is loaded (e.g. by setting LD_LIBRARY_PATH). This reverts commit a783c3d574a1400c4dfdd32975fc511f095df8b2, which changed the use of the QT_VERSION define to a qVersion() call in qmake. Additionally, we use QT_VERSION in qtpaths too for consistency. Pick-to: 6.5 Change-Id: I6c8a1aa6ee6169becd7c685a98ce23c22c3864c7 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'qmake/CMakeLists.txt')
-rw-r--r--qmake/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt
index 8b74b85c49..9be6b92d68 100644
--- a/qmake/CMakeLists.txt
+++ b/qmake/CMakeLists.txt
@@ -40,6 +40,7 @@ target_compile_definitions(QtLibraryInfo PUBLIC
QT_BUILD_QMAKE
QT_USE_QSTRINGBUILDER
QT_NO_FOREACH
+ QT_VERSION_STR="${PROJECT_VERSION}"
QT_HOST_MKSPEC="${QT_QMAKE_HOST_MKSPEC}"
QT_TARGET_MKSPEC="${QT_QMAKE_TARGET_MKSPEC}"
QT_HOST_DATADIR="${hostdatadir}"