aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2
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
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')
-rw-r--r--sources/pyside2/PySide2/QtGui/CMakeLists.txt18
-rw-r--r--sources/pyside2/PySide2/QtNetwork/CMakeLists.txt66
-rw-r--r--sources/pyside2/PySide2/QtWidgets/CMakeLists.txt7
3 files changed, 62 insertions, 29 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)
diff --git a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
index 0ea57693b..a7c8dd8f6 100644
--- a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
@@ -1,24 +1,7 @@
project(QtNetwork)
-set(QtNetwork_OPTIONAL_SRC )
set(QtNetwork_DROPPED_ENTRIES )
-check_qt_class(QtNetwork QDtls QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslCertificate QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslCertificateExtension QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslCipher QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslConfiguration QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslDiffieHellmanParameters QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-# Problems with operator==(QSslEllipticCurve,QSslEllipticCurve)
-# check_qt_class(QtNetwork QSslEllipticCurve QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslError QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslKey QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslPreSharedKeyAuthenticator QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSslSocket QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-
-check_qt_class(QtNetwork QSctpServer QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-check_qt_class(QtNetwork QSctpSocket QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
-
set(QtNetwork_SRC
${QtNetwork_GEN_DIR}/qabstractnetworkcache_wrapper.cpp
${QtNetwork_GEN_DIR}/qabstractsocket_wrapper.cpp
@@ -58,11 +41,58 @@ ${QtNetwork_GEN_DIR}/qssl_wrapper.cpp
${QtNetwork_GEN_DIR}/qtcpserver_wrapper.cpp
${QtNetwork_GEN_DIR}/qtcpsocket_wrapper.cpp
${QtNetwork_GEN_DIR}/qudpsocket_wrapper.cpp
-${QtNetwork_OPTIONAL_SRC}
# module is always needed
${QtNetwork_GEN_DIR}/qtnetwork_module_wrapper.cpp
)
+get_property(QtNetwork_enabled_features TARGET Qt5::Network PROPERTY INTERFACE_QT_ENABLED_FEATURES)
+get_property(QtNetwork_disabled_features TARGET Qt5::Network PROPERTY INTERFACE_QT_DISABLED_FEATURES)
+
+# ### fixme: For cmake >= 3.3, use if( needle IN_LIST list)
+list(FIND QtNetwork_enabled_features "ssl" _sslEnabledIndex)
+list(FIND QtNetwork_disabled_features "dtls" _dtlsDisabledIndex)
+list(FIND QtNetwork_disabled_features "sctp" _sctpDisabledIndex)
+
+if(_sslEnabledIndex EQUAL -1)
+ list(APPEND QtNetwork_DROPPED_ENTRIES QSslCertificate QSslCertificateExtension
+ QSslCipher QSslConfiguration QSslDiffieHellmanParameters QSslError
+ QSslKey QSslPreSharedKeyAuthenticator QSslSocket)
+ message(STATUS "Qt5Network: Dropping SSL classes")
+else()
+ # Problems with operator==(QSslEllipticCurve,QSslEllipticCurve)
+ # check_qt_class(QtNetwork QSslEllipticCurve QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
+ list(APPEND QtNetwork_SRC
+ ${QtNetwork_GEN_DIR}/qsslcertificate_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslcertificateextension_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslcipher_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslconfiguration_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qssldiffiehellmanparameters_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslerror_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslkey_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslpresharedkeyauthenticator_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslsocket_wrapper.cpp)
+ message(STATUS "Qt5Network: Adding SSL classes")
+endif()
+
+if(_dtlsDisabledIndex GREATER -1)
+ list(APPEND QtNetwork_DROPPED_ENTRIES QDtls)
+ message(STATUS "Qt5Network: Dropping DTLS classes")
+else()
+ list(APPEND QtNetwork_SRC
+ ${QtNetwork_GEN_DIR}/qdtls_wrapper.cpp)
+ message(STATUS "Qt5Network: Adding DTLS classes")
+endif()
+
+if(_sctpDisabledIndex GREATER -1)
+ list(APPEND QtNetwork_DROPPED_ENTRIES QSctpServer QSctpSocket)
+ message(STATUS "Qt5Network: Dropping SCTP classes")
+else()
+ list(APPEND QtNetwork_SRC
+ ${QtNetwork_GEN_DIR}/qsctpserver_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsctpsocket_wrapper.cpp)
+ message(STATUS "Qt5Network: Adding SCTP classes")
+endif()
+
set(QtNetwork_include_dirs ${QtNetwork_SOURCE_DIR}
${QtNetwork_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
diff --git a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
index dee79744f..6b8830a41 100644
--- a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
@@ -1,12 +1,5 @@
project(QtWidgets)
-
-set(QtWidgets_OPTIONAL_SRC )
-set(QtWidgets_DROPPED_ENTRIES )
-## XXX check if these conditionals need to be done elsewhere
-check_qt_class(QtWidgets QGtkStyle QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(QtWidgets QMacStyle QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-
set(QtWidgets_SRC
${QtWidgets_GEN_DIR}/qaccessiblewidget_wrapper.cpp
${QtWidgets_GEN_DIR}/qabstractbutton_wrapper.cpp