Revert "CMake: better GLX detection"
This fixes the build when GLX is available. In the .pro files as well as the .cpp files the condition of enabling GLX support is based on the Qt feature system (xlib && opengl && !opengles2). The change to replace the !opengles check with a cmake target check is incomplete for two reasons: (1) the target check would _never_ succeed because there was no find_package() call in scope that would create the target. (2) when the target is found, the .cpp code that checks for the features would fail, because that continues to use the !opengles2 condition -- the preprocessor can't know about cmake targets. So this reverts commit 1361cf5d50e0baa901c06cab7f87785a03c57cb7 and instead calls for an investigation why in Ville's machine desktop gl was disabled. Change-Id: I9a7957224f81b800282c260dee8abcd421fdbc9e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
This commit is contained in:
parent
ca3a7efffd
commit
d3b10dabf2
@ -44,7 +44,7 @@ if(QT_FEATURE_opengl)
|
||||
add_subdirectory(platformcompositor)
|
||||
endif()
|
||||
|
||||
if (QT_FEATURE_xlib AND QT_FEATURE_opengl AND TARGET OpenGL::GLX) # special case
|
||||
if (QT_FEATURE_xlib AND QT_FEATURE_opengl AND (NOT QT_FEATURE_opengles2))
|
||||
add_subdirectory(glxconvenience)
|
||||
endif()
|
||||
|
||||
|
@ -33,7 +33,7 @@ add_qt_plugin(qoffscreen
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
extend_target(qoffscreen CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND TARGET OpenGL::GLX # special case
|
||||
extend_target(qoffscreen CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
|
||||
LIBRARIES
|
||||
|
Loading…
x
Reference in New Issue
Block a user