Follow Qt's OpenGL compile flags

Only link against OpenGL if Qt links against OpenGL. This ensures
that we don't run into issues if Qt links GLES and plasma links
GL because that's found.

REVIEW: 115990
This commit is contained in:
Martin Gräßlin 2014-02-24 09:41:31 +01:00
parent 84afdd044e
commit 1249e5bfc1
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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()