From e3361c161449122112266f34e2afffc03b10558f Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 29 May 2020 15:01:42 +0200 Subject: [PATCH] CMake: Update src\gui\configure.json and the conversion script The ANGLE removal's manual configure.cmake changes are now replaced by updating the conversion script's special cases instead. Change-Id: I06317fe0202b25bd9f9524da14e1bb0ccbb30cc1 Reviewed-by: Friedemann Kleint Reviewed-by: Joerg Bornemann --- src/gui/configure.cmake | 33 ++++++++++++------------------- util/cmake/configurejson2cmake.py | 7 ------- util/cmake/helper.py | 2 +- 3 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index a714a3a703..e844a603ac 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -672,7 +672,7 @@ qt_feature("mtdev" PRIVATE ) qt_feature("opengles2" PUBLIC LABEL "OpenGL ES 2.0" - CONDITION NOT WIN32 AND ( NOT WATCHOS AND NOT QT_FEATURE_opengl_desktop AND GLESv2_FOUND ) + CONDITION NOT WIN32 AND NOT WATCHOS AND NOT QT_FEATURE_opengl_desktop AND GLESv2_FOUND ENABLE INPUT_opengl STREQUAL 'es2' DISABLE INPUT_opengl STREQUAL 'desktop' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no' ) @@ -689,6 +689,13 @@ qt_feature("opengles32" PUBLIC LABEL "OpenGL ES 3.2" CONDITION QT_FEATURE_opengles31 AND TEST_opengles32 ) +qt_feature("opengl-desktop" + LABEL "Desktop OpenGL" + AUTODETECT NOT WIN32 + CONDITION ( WIN32 AND NOT WINRT AND ( MSVC OR OpenGL_FOUND ) ) OR ( NOT WATCHOS AND NOT WIN32 AND NOT WASM AND OpenGL_FOUND ) + ENABLE INPUT_opengl STREQUAL 'desktop' + DISABLE INPUT_opengl STREQUAL 'es2' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no' +) qt_feature("opengl-dynamic" LABEL "Dynamic OpenGL" CONDITION WIN32 AND NOT WINRT @@ -700,12 +707,6 @@ qt_feature("dynamicgl" PUBLIC DISABLE INPUT_opengl STREQUAL 'no' OR INPUT_opengl STREQUAL 'desktop' ) qt_feature_definition("opengl-dynamic" "QT_OPENGL_DYNAMIC") -qt_feature("opengl-desktop" - LABEL "Desktop OpenGL" - CONDITION ( WIN32 AND NOT WINRT AND NOT QT_FEATURE_opengl_dynamic AND ( MSVC OR OpenGL_OpenGL_FOUND ) ) OR ( NOT WATCHOS AND NOT WIN32 AND NOT WASM AND OpenGL_OpenGL_FOUND ) - ENABLE INPUT_opengl STREQUAL 'desktop' - DISABLE INPUT_opengl STREQUAL 'es2' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no' -) qt_feature("opengl" PUBLIC LABEL "OpenGL" CONDITION QT_FEATURE_opengl_desktop OR QT_FEATURE_opengl_dynamic OR QT_FEATURE_opengles2 @@ -725,7 +726,7 @@ qt_feature("openvg" PUBLIC ) qt_feature("egl" PUBLIC PRIVATE LABEL "EGL" - CONDITION ( QT_FEATURE_opengl OR QT_FEATURE_openvg ) AND ( EGL_FOUND ) AND ( QT_FEATURE_dlopen OR NOT UNIX OR INTEGRITY ) + CONDITION ( QT_FEATURE_opengl OR QT_FEATURE_openvg ) AND EGL_FOUND AND ( QT_FEATURE_dlopen OR NOT UNIX OR INTEGRITY ) ) qt_feature_definition("egl" "QT_NO_EGL" NEGATE VALUE "1") qt_feature("egl_x11" PRIVATE @@ -1156,18 +1157,10 @@ qt_configure_add_summary_entry( ARGS "opengl-dynamic" CONDITION WIN32 ) -qt_configure_add_summary_entry( - ARGS "opengles2" - CONDITION NOT WIN32) -qt_configure_add_summary_entry( - ARGS "opengles3" - CONDITION NOT WIN32) -qt_configure_add_summary_entry( - ARGS "opengles31" - CONDITION NOT WIN32) -qt_configure_add_summary_entry( - ARGS "opengles32" - CONDITION NOT WIN32) +qt_configure_add_summary_entry(ARGS "opengles2") +qt_configure_add_summary_entry(ARGS "opengles3") +qt_configure_add_summary_entry(ARGS "opengles31") +qt_configure_add_summary_entry(ARGS "opengles32") qt_configure_end_summary_section() # end of "OpenGL" section qt_configure_add_summary_entry(ARGS "vulkan") qt_configure_add_summary_entry(ARGS "sessionmanager") diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 7f7a103ef6..11bb01a17a 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -884,13 +884,6 @@ def get_feature_mapping(): "msvc_mp": None, "optimize_debug": None, "optimize_size": None, - # special case to enable implicit feature on WIN32, until ANGLE is ported - "opengl-desktop": {"autoDetect": ""}, - # special case to disable implicit feature on WIN32, until ANGLE is ported - "opengl-dynamic": {"autoDetect": "OFF"}, - "opengles2": { # special case to disable implicit feature on WIN32, until ANGLE is ported - "condition": "NOT WIN32 AND ( NOT WATCHOS AND NOT QT_FEATURE_opengl_desktop AND GLESv2_FOUND )" - }, "simulator_and_device": {"condition": "UIKIT AND NOT QT_UIKIT_SDK"}, "pkg-config": {"condition": "PKG_CONFIG_FOUND"}, "posix-libiconv": { diff --git a/util/cmake/helper.py b/util/cmake/helper.py index 83d19ba2f5..c9a71bf036 100644 --- a/util/cmake/helper.py +++ b/util/cmake/helper.py @@ -431,7 +431,7 @@ _library_map = [ LibraryMapping("mysql", "MySQL", "MySQL::MySQL"), LibraryMapping("odbc", "ODBC", "ODBC::ODBC"), LibraryMapping("opengl_es2", "GLESv2", "GLESv2::GLESv2"), - LibraryMapping("opengl", "OpenGL", "OpenGL::GL", resultVariable="OpenGL_OpenGL"), + LibraryMapping("opengl", "OpenGL", "OpenGL::GL", resultVariable="OpenGL"), LibraryMapping( "openssl_headers", "WrapOpenSSLHeaders",