Qt: Fix and clarify OpenGL checks for Qt

This commit is contained in:
Jeffrey Pfau 2015-08-01 10:27:03 -07:00
parent 4e3bad6cd6
commit 88ff7eda5e
1 changed files with 7 additions and 1 deletions

View File

@ -34,7 +34,13 @@ endif()
find_package(Qt5OpenGL)
find_package(Qt5Widgets)
if(NOT Qt5OpenGL_FOUND OR NOT Qt5Widgets_FOUND OR NOT OPENGL_FOUND)
if(NOT BUILD_GL AND NOT BUILD_GLES2)
message(WARNING "OpenGL is required to build the Qt port")
set(BUILD_QT OFF PARENT_SCOPE)
return()
endif()
if(NOT Qt5OpenGL_FOUND OR NOT Qt5Widgets_FOUND)
message(WARNING "Cannot find Qt modules")
set(BUILD_QT OFF PARENT_SCOPE)
return()