summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-06-01 12:51:36 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-06-01 20:21:49 +0200
commit20feedac95c519c71d4db93ab28ad1a110dfbcca (patch)
tree9918a14d1279fffba42a713a934160fb1f3d339f /cmake
parent25888b068caef2db2d34ea9edd6b9a87b18e9221 (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. Pick-to: 6.1 Task-number: QTBUG-89754 Fixes: QTBUG-94040 Change-Id: I567b629d245025d2b1544b91cfc265a9c921725f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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 9307ea8a20..e17bf8840e 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -637,6 +637,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"