Skip to content
Snippets Groups Projects
Commit 726612dc authored by Martin Schultz's avatar Martin Schultz
Browse files

made the Qt finder look for the newer Qt5Core_VERSION variable and set...

made the Qt finder look for the newer Qt5Core_VERSION variable and set Qt5Core_VERSION_STRING to Qt5Core_VERSION if it is found.
This is needed since qt59 does not set the Qt5Core_VERSION_STRING variable properly, which is fine, as this variable is deprecated anyways.
parent edf2c337
No related branches found
No related tags found
1 merge request!19fix to find Qt5.9 RC
......@@ -32,6 +32,9 @@ macro (acg_qt5)
find_package (Qt5Core QUIET)
if(Qt5Core_FOUND)
if(Qt5Core_VERSION) # use the new version variable if it is set
set(Qt5Core_VERSION_STRING ${Qt5Core_VERSION})
endif(Qt5Core_VERSION)
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${Qt5Core_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${Qt5Core_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment