diff --git a/CMakeLists.txt b/CMakeLists.txt index a1b39f095..7b485cc66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,7 @@ set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries" URL "http://www.opengl.org" TYPE OPTIONAL ) -if(OPENGL_FOUND) +if(OPENGL_FOUND AND (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL")) set(HAVE_GLX ${HAVE_X11}) else() set(HAVE_GLX 0) diff --git a/src/declarativeimports/core/CMakeLists.txt b/src/declarativeimports/core/CMakeLists.txt index dadd350f5..97e928303 100644 --- a/src/declarativeimports/core/CMakeLists.txt +++ b/src/declarativeimports/core/CMakeLists.txt @@ -61,7 +61,7 @@ if(HAVE_X11) target_link_libraries(corebindingsplugin ${XCB_SHAPE_LIBRARY}) endif() - if(OPENGL_FOUND) + if(HAVE_GLX) target_link_libraries(corebindingsplugin ${OPENGL_gl_LIBRARY}) endif() endif()