From 48e8f0665806bf043d9f774884addd7c77714d7e Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 7 Apr 2020 15:46:23 +0200 Subject: [PATCH] CMake: Add 'opengl' to QT.gui.CONFIG if OpenGL is ON ...like we do in the qmake build. Change-Id: I1fed28f3294c8556e115c3a86589c98f85554bf8 Reviewed-by: Alexandru Croitor --- src/gui/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 597c10a74e..ae86e5edf2 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -45,6 +45,11 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID} set_source_files_properties(../3rdparty/md4c/md4c.c PROPERTIES COMPILE_FLAGS "-Wno-error=unused-parameter -Wno-error=sign-compare -Wno-error=missing-field-initializers -Wno-error=missing-braces") endif() +unset(qmake_module_config) +if(QT_FEATURE_opengl) + list(APPEND qmake_module_config opengl) +endif() + # special case end qt_add_module(Gui @@ -52,6 +57,7 @@ qt_add_module(Gui PLUGIN_TYPES platforms platforms/darwin xcbglintegrations platformthemes platforminputcontexts generic iconengines imageformats egldeviceintegrations FEATURE_DEPENDENCIES # special case: Qt::Network # special case: + QMAKE_MODULE_CONFIG "${qmake_module_config}" # special case SOURCES image/qbitmap.cpp image/qbitmap.h image/qbmphandler.cpp image/qbmphandler_p.h