diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-25 13:55:12 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-29 12:22:49 +0200 |
commit | 7fcc9cf05500fd3a0a1ba5c2f90a8ad3bcd8e5b0 (patch) | |
tree | 7dda5ed8533912e04c225de93cb357ec8222a988 /src/gui/CMakeLists.txt | |
parent | cd74c867d32e9647ab5933f10b3b7cdec38d5978 (diff) |
CMake: Create a Find module wrapper for OpenGL
Our .prl files embedded an absolute path to the OpenGL.tbd file. This
obviously breaks their usage when used on another machine when no SDK
exists.
To fix that we need to use a "-framework OpenGL" linker flag instead
of linking against the absolute path library.
To convince CMake to do that, we have to create a wrapping
OpenGL target which sets an appropriate INTERFACE_LINK_LIBRARIES
property.
So create a FindWrapOpenGL find module to do that on darwin platforms.
Adjust helper.py and our build system to use it.
This tangentially amends 38cd18384f6198c5bc3ea1da9ffc0158e960a778
because it recreates the FindWrapOpenGL module, but for a different
purpose.
Task-number: QTBUG-85240
Task-number: QTBUG-84781
Change-Id: I3498c19157ae31db5099e6edfb9d71490187f1d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/gui/CMakeLists.txt')
-rw-r--r-- | src/gui/CMakeLists.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index ace304fdef..cfcd759f1e 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -338,8 +338,7 @@ if(QT_FEATURE_opengl) find_package(GLESv2) target_link_libraries(Gui PUBLIC GLESv2::GLESv2) elseif(NOT QT_FEATURE_opengl_dynamic) - find_package(OpenGL) - target_link_libraries(Gui PUBLIC OpenGL::GL) + target_link_libraries(Gui PUBLIC WrapOpenGL::WrapOpenGL) endif() endif() # special case end |