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 <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-04-07 15:46:23 +02:00
parent bb5a505d43
commit 48e8f06658

View File

@ -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