From ebaceac469f19c51da390c7028d28e17ef991df4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 28 Aug 2018 12:51:09 +0200 Subject: PySide2: Replace macro check_qt_class by the Qt configure system Query the feature properties of the configure system to check whether a class is present instead of running a compile test in QtGui and QtNetwork. Remove the macro invocation from QtWigets since the results (QtWidgets_OPTIONAL_SRC, QtWidgets_DROPPED_ENTRIES) were not used. Change-Id: I06e03fe1eef85f2340ab4cdb130b8b31b08f7f14 Reviewed-by: Christian Tismer --- sources/pyside2/PySide2/QtGui/CMakeLists.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'sources/pyside2/PySide2/QtGui/CMakeLists.txt') diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt index 1fe743c01..b330a63bf 100644 --- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt @@ -2,11 +2,9 @@ project(QtGui) qt5_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside2_SOURCE_DIR}/qpytextobject.h") -set(QtGui_OPTIONAL_SRC) set(QtGui_DROPPED_ENTRIES) -check_qt_class(QtGui QOpenGLTimeMonitor QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) -check_qt_class(QtGui QOpenGLTimerQuery QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +get_property(QtGui_enabled_features TARGET Qt5::Gui PROPERTY INTERFACE_QT_ENABLED_FEATURES) set(QtGui_SRC ${QtGui_GEN_DIR}/qabstractopenglfunctions_wrapper.cpp @@ -207,11 +205,23 @@ ${QtGui_GEN_DIR}/qwhatsthisclickedevent_wrapper.cpp ${QtGui_GEN_DIR}/qwheelevent_wrapper.cpp ${QtGui_GEN_DIR}/qwindow_wrapper.cpp ${QtGui_GEN_DIR}/qwindowstatechangeevent_wrapper.cpp -${QtGui_OPTIONAL_SRC} # module is always needed ${QtGui_GEN_DIR}/qtgui_module_wrapper.cpp ) +# cf qtbase/src/gui/opengl/opengl.pri +list(FIND QtGui_enabled_features "opengles2" _opengles2Index) +# ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtGui_enabled_features) +if(_opengles2Index GREATER -1) + list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery) + message(STATUS "Qt5Gui: Dropping Desktop OpenGL classes (GLES2)") +else() + list(APPEND QtGui_SRC + ${QtGui_GEN_DIR}/qopengltimemonitor_wrapper.cpp + ${QtGui_GEN_DIR}/qopengltimerquery_wrapper.cpp) + message(STATUS "Qt5Gui: Adding Desktop OpenGL classes") +endif() + configure_file("${QtGui_SOURCE_DIR}/typesystem_gui.xml.in" "${QtGui_BINARY_DIR}/typesystem_gui.xml" @ONLY) -- cgit v1.2.3