diff --git a/cmake/FindWrapOpenGL.cmake b/cmake/FindWrapOpenGL.cmake deleted file mode 100644 index b3c60ba953..0000000000 --- a/cmake/FindWrapOpenGL.cmake +++ /dev/null @@ -1,20 +0,0 @@ - -# Logic derived from mkspecs/features/unix/opengl.prf: prefer GLESv2 over GL - -if(TARGET WrapOpenGL) - set(WrapOpenGL_FOUND ON) - return() -endif() - -add_library(WrapOpenGL INTERFACE IMPORTED) - -if(QT_FEATURE_opengles2) - find_package(GLESv2) - target_link_libraries(WrapOpenGL INTERFACE GLESv2::GLESv2) -else() - find_package(OpenGL) - target_link_libraries(WrapOpenGL INTERFACE OpenGL::GL) -endif() -set(WrapOpenGL_FOUND ON) - -set_property(TARGET WrapOpenGL PROPERTY IMPORTED_GLOBAL TRUE) 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: diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 7acfedf46b..b662f8e092 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -336,12 +336,20 @@ extend_target(Gui CONDITION QT_FEATURE_standarditemmodel # special case begin # With qmake, gui's opengl.pri used CONFIG += opengl, where opengl.prf -# acted like WrapOpenGL: direct linkage against either libGLESv2 or -# libGL, depending on the opengl _feature_. This is done by hand now -# here (where the feature is available). +# used direct public linkage against either libGLESv2 or libGL, depending +# on the opengl _feature_. This is done by hand now here (where the +# feature is available). # DO NOT MOVE THIS TO THE BEGINNING OF THE FILE, the feature variables are not # available until the add_qt_module call. -qt_find_package(WrapOpenGL PROVIDED_TARGETS WrapOpenGL) +if(QT_FEATURE_opengl) + if(QT_FEATURE_opengles2) + find_package(GLESv2) + target_link_libraries(Gui PUBLIC GLESv2::GLESv2) + else() + find_package(OpenGL) + target_link_libraries(Gui PUBLIC OpenGL::GL) + endif() +endif() # special case end extend_target(Gui CONDITION QT_FEATURE_opengl @@ -376,20 +384,8 @@ extend_target(Gui CONDITION QT_FEATURE_opengl opengl/qopenglversionfunctions.cpp opengl/qopenglversionfunctions.h opengl/qopenglversionfunctionsfactory.cpp opengl/qopenglversionfunctionsfactory_p.h opengl/qopenglvertexarrayobject.cpp opengl/qopenglvertexarrayobject.h - LIBRARIES # special case - WrapOpenGL # special case ) -# special case begin -# qopenglfunctions.h on Android does not use the function -# table indirection for calls but calls ::glFoo in inline functions -# directly. That means the GL library is a public dependency. -extend_target(Gui CONDITION QT_FEATURE_opengl AND ANDROID - PUBLIC_LIBRARIES - WrapOpenGL -) -# special case end - #### Keys ignored in scope 2:.:.:gui.pro:QT_FEATURE_opengl: # MODULE_CONFIG = "opengl" diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt index 53a59b3434..2844fac32d 100644 --- a/src/opengl/CMakeLists.txt +++ b/src/opengl/CMakeLists.txt @@ -30,7 +30,6 @@ add_qt_module(OpenGL Qt::CorePrivate Qt::GuiPrivate Qt::WidgetsPrivate - WrapOpenGL # special case PUBLIC_LIBRARIES Qt::Core Qt::Gui diff --git a/src/platformsupport/glxconvenience/CMakeLists.txt b/src/platformsupport/glxconvenience/CMakeLists.txt index dc9a325b6b..a435de85ee 100644 --- a/src/platformsupport/glxconvenience/CMakeLists.txt +++ b/src/platformsupport/glxconvenience/CMakeLists.txt @@ -1,7 +1,6 @@ # Generated from glxconvenience.pro. qt_find_package(X11) # special case -qt_find_package(WrapOpenGL PROVIDED_TARGETS WrapOpenGL) # special case ##################################################################### ## GlxSupport Module: @@ -14,7 +13,6 @@ add_qt_module(GlxSupport DEFINES QT_NO_CAST_FROM_ASCII LIBRARIES - WrapOpenGL # special case Qt::CorePrivate Qt::GuiPrivate X11::X11 # special case diff --git a/src/plugins/platforms/cocoa/CMakeLists.txt b/src/plugins/platforms/cocoa/CMakeLists.txt index 9a6902356e..a715c59376 100644 --- a/src/plugins/platforms/cocoa/CMakeLists.txt +++ b/src/plugins/platforms/cocoa/CMakeLists.txt @@ -2,7 +2,6 @@ # special case: qt_find_package(Cups PROVIDED_TARGETS Cups::Cups) -qt_find_package(WrapOpenGL PROVIDED_TARGETS WrapOpenGL) ##################################################################### ## qcocoa Plugin: @@ -92,8 +91,6 @@ add_qt_resource(qcocoa "qcocoaresources" PREFIX "/qt-project.org/mac/cursors" FI extend_target(qcocoa CONDITION QT_FEATURE_opengl # special case SOURCES qcocoaglcontext.h qcocoaglcontext.mm - LIBRARIES - WrapOpenGL # special case ) extend_target(qcocoa CONDITION QT_FEATURE_vulkan diff --git a/src/plugins/platforms/eglfs/CMakeLists.txt b/src/plugins/platforms/eglfs/CMakeLists.txt index b69f06a499..932d07dec2 100644 --- a/src/plugins/platforms/eglfs/CMakeLists.txt +++ b/src/plugins/platforms/eglfs/CMakeLists.txt @@ -1,5 +1,4 @@ qt_find_package(EGL) # special case -qt_find_package(WrapOpenGL PROVIDED_TARGETS WrapOpenGL) # special case ##################################################################### ## EglFSDeviceIntegration Module: @@ -30,7 +29,6 @@ add_qt_module(EglFSDeviceIntegration Qt::ServiceSupportPrivate Qt::ThemeSupportPrivate EGL::EGL # special case - WrapOpenGL # special case ) #### Keys ignored in scope 2:.:./eglfsdeviceintegration.pro:: diff --git a/src/plugins/platforms/minimalegl/CMakeLists.txt b/src/plugins/platforms/minimalegl/CMakeLists.txt index 6fc52355c8..a038d07df9 100644 --- a/src/plugins/platforms/minimalegl/CMakeLists.txt +++ b/src/plugins/platforms/minimalegl/CMakeLists.txt @@ -1,7 +1,5 @@ # Generated from minimalegl.pro. -qt_find_package(WrapOpenGL PROVIDED_TARGETS WrapOpenGL) # special case - ##################################################################### ## qminimalegl Plugin: ##################################################################### @@ -21,7 +19,6 @@ add_qt_plugin(qminimalegl Qt::EventDispatcherSupportPrivate Qt::FontDatabaseSupportPrivate Qt::EglSupportPrivate - WrapOpenGL # CONFIG = "egl" # OTHER_FILES = "minimalegl.json" # PLUGIN_CLASS_NAME = "QMinimalEglIntegrationPlugin" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 109a165d74..82da3e7b36 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,7 +9,6 @@ if(NOT TARGET Qt::Test) # Find a few packages that are usually found in configure.cmake, # because a few tests link directly against those libraries. qt_find_package(WrapDBus1 PROVIDED_TARGETS dbus-1) - qt_find_package(WrapOpenGL PROVIDED_TARGETS WrapOpenGL) endif() # special case end