aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/QtGui/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/PySide2/QtGui/CMakeLists.txt')
-rw-r--r--sources/pyside2/PySide2/QtGui/CMakeLists.txt38
1 files changed, 23 insertions, 15 deletions
diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
index 1fe743c01..f514ea7c9 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)
@@ -234,17 +244,15 @@ set(QtGui_libraries pyside2
${Qt5Gui_LIBRARIES})
set(QtGui_deps QtCore)
-create_pyside_module(QtGui
- QtGui_include_dirs
- QtGui_libraries
- QtGui_deps
- QtGui_SOURCE_DIR
- QtGui_SRC
- QPYTEXTOBJECT_MOC
- ${QtGui_BINARY_DIR}/typesystem_gui.xml
- ""
- ""
- QtGui_DROPPED_ENTRIES)
+create_pyside_module(NAME QtGui
+ INCLUDE_DIRS QtGui_include_dirs
+ LIBRARIES QtGui_libraries
+ DEPS QtGui_deps
+ TYPESYSTEM_PATH QtGui_SOURCE_DIR
+ SOURCES QtGui_SRC
+ STATIC_SOURCES QPYTEXTOBJECT_MOC
+ TYPESYSTEM_NAME ${QtGui_BINARY_DIR}/typesystem_gui.xml
+ DROPPED_ENTRIES QtGui_DROPPED_ENTRIES)
install(FILES ${pyside2_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide2/QtGui/)