Commit 7164801e authored by Martin Schultz's avatar Martin Schultz

* minor adjustment to the qt5 finder

parent b4943ef6
Pipeline #1684 passed with stage
...@@ -264,10 +264,9 @@ macro (acg_qt5) ...@@ -264,10 +264,9 @@ macro (acg_qt5)
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_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_MINOR "${Qt5Core_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}") string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}")
endif(Qt5Core_FOUND)
#find WINDOWS_SDK to avoid qt error. This must be done BEFORE Qt5Widgets is searched #find WINDOWS_SDK to avoid qt error. This must be done BEFORE Qt5Widgets is searched
if (Qt5Core_FOUND AND WIN32) if (WIN32)
if ( (QT_VERSION_MAJOR EQUAL 5) AND (QT_VERSION_MINOR LESS 3 OR ( QT_VERSION_MINOR EQUAL 3 AND QT_VERSION_PATCH EQUAL 0 )) ) # for all Qt version > 5.0.0 and < 5.3.1 if ( (QT_VERSION_MAJOR EQUAL 5) AND (QT_VERSION_MINOR LESS 3 OR ( QT_VERSION_MINOR EQUAL 3 AND QT_VERSION_PATCH EQUAL 0 )) ) # for all Qt version > 5.0.0 and < 5.3.1
#glu32.lib is needed by qt5 opengl version. it cannot find it by itself so we help qt #glu32.lib is needed by qt5 opengl version. it cannot find it by itself so we help qt
#this block has to be executed, before Qt5Gui is searched, otherwise we will end up with the (not so useful) QT5 error message #this block has to be executed, before Qt5Gui is searched, otherwise we will end up with the (not so useful) QT5 error message
...@@ -278,7 +277,7 @@ macro (acg_qt5) ...@@ -278,7 +277,7 @@ macro (acg_qt5)
message(FATAL_ERROR "Could not find glu32.lib. This is necessary for QT5 OpenGL version for windows, spleace specify glu32.lib in WINDOWS_SDK_LIB or install Qt version >= 5.3.1") message(FATAL_ERROR "Could not find glu32.lib. This is necessary for QT5 OpenGL version for windows, spleace specify glu32.lib in WINDOWS_SDK_LIB or install Qt version >= 5.3.1")
endif() endif()
endif() endif()
endif(Qt5Core_FOUND AND WIN32) endif(WIN32)
#do noot look for Webkit and qt declarative on qt version 5.6 or newer #do noot look for Webkit and qt declarative on qt version 5.6 or newer
if(${QT_VERSION_MINOR} GREATER 5) if(${QT_VERSION_MINOR} GREATER 5)
...@@ -319,7 +318,6 @@ macro (acg_qt5) ...@@ -319,7 +318,6 @@ macro (acg_qt5)
find_package (Qt5X11Extras QUIET) find_package (Qt5X11Extras QUIET)
endif () endif ()
if(${QT_VERSION_MINOR} GREATER 5) if(${QT_VERSION_MINOR} GREATER 5)
if (Qt5Core_FOUND AND Qt5Widgets_FOUND if (Qt5Core_FOUND AND Qt5Widgets_FOUND
AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND AND Qt5Network_FOUND AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND AND Qt5Network_FOUND
...@@ -339,6 +337,7 @@ macro (acg_qt5) ...@@ -339,6 +337,7 @@ macro (acg_qt5)
set (QT5_FOUND TRUE) set (QT5_FOUND TRUE)
endif() endif()
endif(${QT_VERSION_MINOR} GREATER 5) endif(${QT_VERSION_MINOR} GREATER 5)
endif(Qt5Core_FOUND)
if (QT5_FOUND) if (QT5_FOUND)
acg_unset_qt_shared_variables(5) acg_unset_qt_shared_variables(5)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment