aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/QtGui/CMakeLists.txt
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-28 12:51:09 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-10-01 09:11:39 +0000
commitebaceac469f19c51da390c7028d28e17ef991df4 (patch)
tree07e2ea02a5e45bae23201d890a8086279207cf41 /sources/pyside2/PySide2/QtGui/CMakeLists.txt
parent2f548c62d50b49e193c9f7575fa6a4601b697609 (diff)
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 <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/PySide2/QtGui/CMakeLists.txt')
-rw-r--r--sources/pyside2/PySide2/QtGui/CMakeLists.txt18
1 files changed, 14 insertions, 4 deletions
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)