From 38cd18384f6198c5bc3ea1da9ffc0158e960a778 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 5 Jun 2019 10:46:16 +0200 Subject: Fix OpenGL vs. GLESv2 linkage, attempt number three We introduced WrapOpenGL to link against either desktop GL or GLESv2 depending on the GL feature in QtGui. This works "fine", with two caveats: (1) find_package(WrapOpenGL) must be called after find_package(Qt5Gui) in order for the feature check in FindWrapOpenGL.cmake to work. That's error prone. (2) More and more places are popping up, in particular examples, where GL linkage is required due to inline functions in Qt that forward to GL functions - such as on Android. This in particular explains the qmake behavior of making the GL linkage (desktop _or_ GLES) a public dependency of QtGui, so only Gui linkage is required. Those two aspects combined are the nail in the coffin of FindWrapOpenGL and it would seem much easier to simply make the Desktop GL vs. GLES decision once in Gui's CMakeLists.txt and let Qt5GuiDependencies.cmake propagate this well. This allows us to get rid of plenty of special cases as well. Change-Id: I3a7e8af49537ce5f215f24470e075a4ae9aeb944 Reviewed-by: Alexandru Croitor --- examples/widgets/graphicsview/boxes/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'examples') diff --git a/examples/widgets/graphicsview/boxes/CMakeLists.txt b/examples/widgets/graphicsview/boxes/CMakeLists.txt index af2891ffb1..11331b1906 100644 --- a/examples/widgets/graphicsview/boxes/CMakeLists.txt +++ b/examples/widgets/graphicsview/boxes/CMakeLists.txt @@ -1,6 +1,5 @@ # Generated from boxes.pro. -qt_find_package(WrapOpenGL PROVIDED_TARGETS WrapOpenGL) # special case ##################################################################### ## boxes Binary: ##################################################################### @@ -22,7 +21,6 @@ add_qt_executable(boxes LIBRARIES Qt::OpenGL Qt::Widgets - WrapOpenGL ) # Resources: -- cgit v1.2.3