summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-06-01 12:51:36 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-01 20:56:10 +0000
commitde86dac33c3859af54a39beb3deb1561cc750c12 (patch)
tree497cf97d0930bfe8235e89afecf4a87209da3b9a /cmake
parent234cabe51b13fc054bfad9070f19acb787899844 (diff)
Pass OpenGL_GL_PREFERENCE variable to other Qt repos
When building Linux packages, we pass OpenGL_GL_PREFERENCE=LEGACY when building qtbase. This is done to link against legacy OpenGL libs. When building non-qtbase repos, we also need to set this variable to the same value we have in qtbase. Task-number: QTBUG-89754 Fixes: QTBUG-94040 Change-Id: I567b629d245025d2b1544b91cfc265a9c921725f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 20feedac95c519c71d4db93ab28ad1a110dfbcca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPostProcessHelpers.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index f508acc169..1061ed7003 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -632,6 +632,14 @@ endif()
")
endif()
+ if(DEFINED OpenGL_GL_PREFERENCE)
+ string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
+ "
+# Use the OpenGL_GL_PREFERENCE value qtbase was built with. But do not FORCE it.
+set(OpenGL_GL_PREFERENCE \"${OpenGL_GL_PREFERENCE}\" CACHE STRING \"\")
+")
+ endif()
+
qt_compute_relative_path_from_cmake_config_dir_to_prefix()
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsExtra.cmake.in"