summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2013-01-07 18:06:35 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2013-01-07 18:06:35 (GMT)
commit4b9ec00d0e175ec4cc7e1fbe6ed7d1dcbcfb25ba (patch)
treed9db616ef589b781dd27c74711b4b5a26b5e3854
parentc7550d5ef12d8185fad93d581ebd52474ae3d1b0 (diff)
downloadCMake-4b9ec00d0e175ec4cc7e1fbe6ed7d1dcbcfb25ba.zip
CMake-4b9ec00d0e175ec4cc7e1fbe6ed7d1dcbcfb25ba.tar.gz
CMake-4b9ec00d0e175ec4cc7e1fbe6ed7d1dcbcfb25ba.tar.bz2
FindQt4: set QT_VERSION_* variables sooner.
Set QT_VERSION_* variables sooner so they can be set before Qt4ConfigDependentSettings.cmake uses them.
-rw-r--r--Modules/FindQt4.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index ea4d8f4..84196cc 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -538,6 +538,11 @@ endif ()
if (QT_QMAKE_EXECUTABLE AND QTVERSION)
+ # set version variables
+ string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
+
# ask qmake for the mkspecs directory
# we do this first because QT_LIBINFIX might be set
if (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
@@ -1174,11 +1179,6 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
include("${_qt4_current_dir}/Qt4Macros.cmake")
- # set version variables
- string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
- string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
- string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-
endif()
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()