From 5ef2f26ec2e7a91ad2110821e2d5862517d08ca6 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Wed, 16 Feb 2011 11:37:45 -0300 Subject: [PATCH] Updated CMake files to use the "--drop-type-entries" generator option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of maintaining a complex CMake scheme to remove optional type system entries, the generation will rely on the new generator capability of dropping entries given via command line. Reviewed by Bruno Araújo Reviewed by Lauro Moura Reviewed by Luciano Wolf --- PySide/QtCore/CMakeLists.txt | 7 +- PySide/QtDeclarative/CMakeLists.txt | 9 +- PySide/QtGui/CMakeLists.txt | 42 ++++----- .../optional/QAbstractPageSetupDialog.xml | 1 - .../QtGui/optional/QAbstractPrintDialog.xml | 6 -- PySide/QtGui/optional/QGtkStyle.xml | 11 --- PySide/QtGui/optional/QPageSetupDialog.xml | 5 -- PySide/QtGui/optional/QPrintDialog.xml | 3 - PySide/QtGui/optional/QPrintEngine.xml | 3 - PySide/QtGui/optional/QPrintPreviewDialog.xml | 1 - PySide/QtGui/optional/QPrintPreviewWidget.xml | 6 -- PySide/QtGui/optional/QPrinter.xml | 30 ------- PySide/QtGui/optional/QPrinterInfo.xml | 1 - PySide/QtGui/optional/QSessionManager.xml | 7 -- PySide/QtGui/optional/QSizeGrip.xml | 2 - PySide/QtGui/optional/QSystemTrayIcon.xml | 10 --- PySide/QtGui/typesystem_gui_common.xml | 90 +++++++++++++++++++ PySide/QtHelp/CMakeLists.txt | 3 +- PySide/QtMaemo5/CMakeLists.txt | 3 +- PySide/QtMultimedia/CMakeLists.txt | 3 +- PySide/QtNetwork/CMakeLists.txt | 24 ++--- PySide/QtNetwork/optional/QSslCertificate.xml | 1 - PySide/QtNetwork/optional/QSslCipher.xml | 1 - .../QtNetwork/optional/QSslConfiguration.xml | 1 - PySide/QtNetwork/optional/QSslError.xml | 4 - PySide/QtNetwork/optional/QSslKey.xml | 1 - PySide/QtNetwork/optional/QSslSocket.xml | 6 -- PySide/QtNetwork/typesystem_network.xml | 19 ++++ PySide/QtOpenGL/CMakeLists.txt | 3 +- PySide/QtScript/CMakeLists.txt | 3 +- PySide/QtScriptTools/CMakeLists.txt | 3 +- PySide/QtSql/CMakeLists.txt | 3 +- PySide/QtSvg/CMakeLists.txt | 3 +- PySide/QtTest/CMakeLists.txt | 3 +- PySide/QtUiTools/CMakeLists.txt | 3 +- PySide/QtWebKit/CMakeLists.txt | 3 +- PySide/QtXml/CMakeLists.txt | 3 +- PySide/QtXmlPatterns/CMakeLists.txt | 3 +- PySide/phonon/CMakeLists.txt | 14 +-- PySide/phonon/optional/VideoCaptureDevice.xml | 5 -- PySide/phonon/typesystem_phonon.xml | 11 ++- cmake/Macros/PySideModules.cmake | 46 +++++----- 42 files changed, 201 insertions(+), 205 deletions(-) delete mode 100644 PySide/QtGui/optional/QAbstractPageSetupDialog.xml delete mode 100644 PySide/QtGui/optional/QAbstractPrintDialog.xml delete mode 100644 PySide/QtGui/optional/QGtkStyle.xml delete mode 100644 PySide/QtGui/optional/QPageSetupDialog.xml delete mode 100644 PySide/QtGui/optional/QPrintDialog.xml delete mode 100644 PySide/QtGui/optional/QPrintEngine.xml delete mode 100644 PySide/QtGui/optional/QPrintPreviewDialog.xml delete mode 100644 PySide/QtGui/optional/QPrintPreviewWidget.xml delete mode 100644 PySide/QtGui/optional/QPrinter.xml delete mode 100644 PySide/QtGui/optional/QPrinterInfo.xml delete mode 100644 PySide/QtGui/optional/QSessionManager.xml delete mode 100644 PySide/QtGui/optional/QSizeGrip.xml delete mode 100644 PySide/QtGui/optional/QSystemTrayIcon.xml delete mode 100644 PySide/QtNetwork/optional/QSslCertificate.xml delete mode 100644 PySide/QtNetwork/optional/QSslCipher.xml delete mode 100644 PySide/QtNetwork/optional/QSslConfiguration.xml delete mode 100644 PySide/QtNetwork/optional/QSslError.xml delete mode 100644 PySide/QtNetwork/optional/QSslKey.xml delete mode 100644 PySide/QtNetwork/optional/QSslSocket.xml delete mode 100644 PySide/phonon/optional/VideoCaptureDevice.xml diff --git a/PySide/QtCore/CMakeLists.txt b/PySide/QtCore/CMakeLists.txt index 056597c..c486b7c 100644 --- a/PySide/QtCore/CMakeLists.txt +++ b/PySide/QtCore/CMakeLists.txt @@ -34,8 +34,6 @@ else() ) endif() - - set(QtCore_SRC ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qabstracteventdispatcher_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qabstractfileengine_wrapper.cpp @@ -60,7 +58,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdiriterator_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdynamicpropertychangeevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qevent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qeventloop_wrapper.cpp -${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/qfactoryinterface_wrapper.cpp +${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfactoryinterface_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfile_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfileinfo_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfilesystemwatcher_wrapper.cpp @@ -154,5 +152,4 @@ create_pyside_module(QtCore QtCore_libraries "" QtCore_typesystem_path - QtCore_SRC - "") + QtCore_SRC) diff --git a/PySide/QtDeclarative/CMakeLists.txt b/PySide/QtDeclarative/CMakeLists.txt index 0fc96d4..591b6ac 100644 --- a/PySide/QtDeclarative/CMakeLists.txt +++ b/PySide/QtDeclarative/CMakeLists.txt @@ -1,5 +1,7 @@ project(QtDeclarative) +set(QtDeclarative_registerType "${CMAKE_CURRENT_SOURCE_DIR}/pysideqmlregistertype.cpp") + set(QtDeclarative_SRC ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecomponent_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecontext_wrapper.cpp @@ -19,6 +21,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeproperty_wrapper.cp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativescriptstring_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeview_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qtdeclarative_module_wrapper.cpp +${QtDeclarative_registerType} ) set(QtDeclarative_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtDeclarative_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}") @@ -49,13 +52,11 @@ set(QtDeclarative_libraries pyside ${QT_QTDECLARATIVE_LIBRARY}) set(QtDeclarative_deps QtGui QtNetwork) -set(QtDeclarative_registerType "${CMAKE_CURRENT_SOURCE_DIR}/pysideqmlregistertype.cpp") + create_pyside_module(QtDeclarative QtDeclarative_include_dirs QtDeclarative_libraries QtDeclarative_deps QtDeclarative_typesystem_path - QtDeclarative_SRC - "" - QtDeclarative_registerType) + QtDeclarative_SRC) diff --git a/PySide/QtGui/CMakeLists.txt b/PySide/QtGui/CMakeLists.txt index 4313606..c25a95e 100644 --- a/PySide/QtGui/CMakeLists.txt +++ b/PySide/QtGui/CMakeLists.txt @@ -5,7 +5,7 @@ if(ENABLE_X11) ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11info_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedcontainer_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedwidget_wrapper.cpp - ) + ) if(Q_WS_MAEMO_5) set(SPECIFIC_OS_FILES @@ -60,6 +60,22 @@ else() ) endif () +set(QtGui_OPTIONAL_SRC ) +set(QtGui_DROPPED_ENTRIES ) +check_qt_class(QtGui QAbstractPageSetupDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QAbstractPrintDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QGtkStyle QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QPageSetupDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QPrintDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QPrintEngine QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QPrintPreviewDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QPrintPreviewWidget QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QPrinter QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QPrinterInfo QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QSessionManager QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QSizeGrip QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) +check_qt_class(QtGui QSystemTrayIcon QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES) + qt4_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside_SOURCE_DIR}/qpytextobject.h") set(QtGui_SRC @@ -378,27 +394,13 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qwizard_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qworkspace_wrapper.cpp ${SPECIFIC_OS_FILES} +${QPYTEXTOBJECT_MOC} ${QtGui_46_SRC} +${QtGui_OPTIONAL_SRC} ) -set(TARGET_TYPESYSTEM "${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_gui.xml.in" - "${TARGET_TYPESYSTEM}" @ONLY) - -check_qt_class(QtGui QGtkStyle QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QSessionManager QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QSizeGrip QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QSystemTrayIcon QtGui_SRC ${TARGET_TYPESYSTEM}) - -check_qt_class(QtGui QAbstractPageSetupDialog QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QAbstractPrintDialog QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QPageSetupDialog QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QPrintDialog QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QPrintPreviewWidget QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QPrintPreviewDialog QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QPrinter QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QPrinterInfo QtGui_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtGui QPrintEngine QtGui_SRC ${TARGET_TYPESYSTEM}) + "${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY) set(QtGui_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}") set(QtGui_include_dirs ${CMAKE_CURRENT_SOURCE_DIR} @@ -421,8 +423,6 @@ create_pyside_module(QtGui QtGui_deps QtGui_typesystem_path QtGui_SRC - ${TARGET_TYPESYSTEM} - QPYTEXTOBJECT_MOC) - + ${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml) install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/) diff --git a/PySide/QtGui/optional/QAbstractPageSetupDialog.xml b/PySide/QtGui/optional/QAbstractPageSetupDialog.xml deleted file mode 100644 index 902fb6e..0000000 --- a/PySide/QtGui/optional/QAbstractPageSetupDialog.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PySide/QtGui/optional/QAbstractPrintDialog.xml b/PySide/QtGui/optional/QAbstractPrintDialog.xml deleted file mode 100644 index 373cf30..0000000 --- a/PySide/QtGui/optional/QAbstractPrintDialog.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/PySide/QtGui/optional/QGtkStyle.xml b/PySide/QtGui/optional/QGtkStyle.xml deleted file mode 100644 index e75e06c..0000000 --- a/PySide/QtGui/optional/QGtkStyle.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/PySide/QtGui/optional/QPageSetupDialog.xml b/PySide/QtGui/optional/QPageSetupDialog.xml deleted file mode 100644 index 66fe064..0000000 --- a/PySide/QtGui/optional/QPageSetupDialog.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/PySide/QtGui/optional/QPrintDialog.xml b/PySide/QtGui/optional/QPrintDialog.xml deleted file mode 100644 index 7b62f48..0000000 --- a/PySide/QtGui/optional/QPrintDialog.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/PySide/QtGui/optional/QPrintEngine.xml b/PySide/QtGui/optional/QPrintEngine.xml deleted file mode 100644 index 0f792fc..0000000 --- a/PySide/QtGui/optional/QPrintEngine.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/PySide/QtGui/optional/QPrintPreviewDialog.xml b/PySide/QtGui/optional/QPrintPreviewDialog.xml deleted file mode 100644 index 635f390..0000000 --- a/PySide/QtGui/optional/QPrintPreviewDialog.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PySide/QtGui/optional/QPrintPreviewWidget.xml b/PySide/QtGui/optional/QPrintPreviewWidget.xml deleted file mode 100644 index cf60a03..0000000 --- a/PySide/QtGui/optional/QPrintPreviewWidget.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/PySide/QtGui/optional/QPrinter.xml b/PySide/QtGui/optional/QPrinter.xml deleted file mode 100644 index b57416c..0000000 --- a/PySide/QtGui/optional/QPrinter.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PySide/QtGui/optional/QPrinterInfo.xml b/PySide/QtGui/optional/QPrinterInfo.xml deleted file mode 100644 index 479c4b4..0000000 --- a/PySide/QtGui/optional/QPrinterInfo.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PySide/QtGui/optional/QSessionManager.xml b/PySide/QtGui/optional/QSessionManager.xml deleted file mode 100644 index b8be5e8..0000000 --- a/PySide/QtGui/optional/QSessionManager.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/PySide/QtGui/optional/QSizeGrip.xml b/PySide/QtGui/optional/QSizeGrip.xml deleted file mode 100644 index a0792da..0000000 --- a/PySide/QtGui/optional/QSizeGrip.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/PySide/QtGui/optional/QSystemTrayIcon.xml b/PySide/QtGui/optional/QSystemTrayIcon.xml deleted file mode 100644 index 4387590..0000000 --- a/PySide/QtGui/optional/QSystemTrayIcon.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 724ac1e..e1a6f40 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -6002,4 +6002,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PySide/QtHelp/CMakeLists.txt b/PySide/QtHelp/CMakeLists.txt index 0ca0272..96c2375 100644 --- a/PySide/QtHelp/CMakeLists.txt +++ b/PySide/QtHelp/CMakeLists.txt @@ -38,5 +38,4 @@ create_pyside_module(QtHelp QtHelp_libraries QtHelp_deps QtHelp_typesystem_path - QtHelp_SRC - "") + QtHelp_SRC) diff --git a/PySide/QtMaemo5/CMakeLists.txt b/PySide/QtMaemo5/CMakeLists.txt index 30bf15c..ff60a8f 100644 --- a/PySide/QtMaemo5/CMakeLists.txt +++ b/PySide/QtMaemo5/CMakeLists.txt @@ -45,6 +45,5 @@ create_pyside_module(QtMaemo5 QtMaemo5_libraries QtMaemo5_deps QtMaemo5_typesystem_path - QtMaemo5_SRC - "") + QtMaemo5_SRC) diff --git a/PySide/QtMultimedia/CMakeLists.txt b/PySide/QtMultimedia/CMakeLists.txt index 8823838..22c921d 100644 --- a/PySide/QtMultimedia/CMakeLists.txt +++ b/PySide/QtMultimedia/CMakeLists.txt @@ -44,5 +44,4 @@ create_pyside_module(QtMultimedia QtMultimedia_libraries QtMultimedia_deps QtMultimedia_typesystem_path - QtMultimedia_SRC - "") + QtMultimedia_SRC) diff --git a/PySide/QtNetwork/CMakeLists.txt b/PySide/QtNetwork/CMakeLists.txt index 50f8103..0f2273a 100644 --- a/PySide/QtNetwork/CMakeLists.txt +++ b/PySide/QtNetwork/CMakeLists.txt @@ -10,6 +10,15 @@ else() set(QtNetwork_47_SRC ) endif () +set(QtNetwork_OPTIONAL_SRC ) +set(QtNetwork_DROPPED_ENTRIES ) +check_qt_class(QtNetwork QSslCertificate 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 QSslError QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES) +check_qt_class(QtNetwork QSslKey QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES) +check_qt_class(QtNetwork QSslSocket QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES) + set(QtNetwork_SRC ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractnetworkcache_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp @@ -44,19 +53,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qudpsocket_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qurlinfo_wrapper.cpp ${QtNetwork_47_SRC} +${QtNetwork_OPTIONAL_SRC} ) -set(TARGET_TYPESYSTEM "${CMAKE_CURRENT_BINARY_DIR}/typesystem_network.xml") -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_network.xml" - "${TARGET_TYPESYSTEM}" @ONLY) - -check_qt_class(QtNetwork QSslCertificate QtNetwork_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtNetwork QSslCipher QtNetwork_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtNetwork QSslConfiguration QtNetwork_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtNetwork QSslError QtNetwork_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtNetwork QSslKey QtNetwork_SRC ${TARGET_TYPESYSTEM}) -check_qt_class(QtNetwork QSslSocket QtNetwork_SRC ${TARGET_TYPESYSTEM}) - set(QtNetwork_typesystem_path "${QtCore_SOURCE_DIR}") set(QtNetwork_include_dirs ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/ @@ -79,4 +78,5 @@ create_pyside_module(QtNetwork QtNetwork_deps QtNetwork_typesystem_path QtNetwork_SRC - ${TARGET_TYPESYSTEM}) + "" + QtNetwork_DROPPED_ENTRIES) diff --git a/PySide/QtNetwork/optional/QSslCertificate.xml b/PySide/QtNetwork/optional/QSslCertificate.xml deleted file mode 100644 index 7acf97c..0000000 --- a/PySide/QtNetwork/optional/QSslCertificate.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PySide/QtNetwork/optional/QSslCipher.xml b/PySide/QtNetwork/optional/QSslCipher.xml deleted file mode 100644 index 15ff59a..0000000 --- a/PySide/QtNetwork/optional/QSslCipher.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PySide/QtNetwork/optional/QSslConfiguration.xml b/PySide/QtNetwork/optional/QSslConfiguration.xml deleted file mode 100644 index 31c5e83..0000000 --- a/PySide/QtNetwork/optional/QSslConfiguration.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PySide/QtNetwork/optional/QSslError.xml b/PySide/QtNetwork/optional/QSslError.xml deleted file mode 100644 index 0e4cf3e..0000000 --- a/PySide/QtNetwork/optional/QSslError.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/PySide/QtNetwork/optional/QSslKey.xml b/PySide/QtNetwork/optional/QSslKey.xml deleted file mode 100644 index 88a6370..0000000 --- a/PySide/QtNetwork/optional/QSslKey.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PySide/QtNetwork/optional/QSslSocket.xml b/PySide/QtNetwork/optional/QSslSocket.xml deleted file mode 100644 index 415e681..0000000 --- a/PySide/QtNetwork/optional/QSslSocket.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/PySide/QtNetwork/typesystem_network.xml b/PySide/QtNetwork/typesystem_network.xml index 8a677fd..5b06579 100644 --- a/PySide/QtNetwork/typesystem_network.xml +++ b/PySide/QtNetwork/typesystem_network.xml @@ -280,4 +280,23 @@ + + + + + + + + + + + + + + + + + + + diff --git a/PySide/QtOpenGL/CMakeLists.txt b/PySide/QtOpenGL/CMakeLists.txt index 44ba1c1..719f46c 100644 --- a/PySide/QtOpenGL/CMakeLists.txt +++ b/PySide/QtOpenGL/CMakeLists.txt @@ -54,5 +54,4 @@ create_pyside_module(QtOpenGL QtOpenGL_libraries QtOpenGL_deps QtOpenGL_typesystem_path - QtOpenGL_SRC - "") + QtOpenGL_SRC) diff --git a/PySide/QtScript/CMakeLists.txt b/PySide/QtScript/CMakeLists.txt index 88b0a06..b4ec794 100644 --- a/PySide/QtScript/CMakeLists.txt +++ b/PySide/QtScript/CMakeLists.txt @@ -45,5 +45,4 @@ create_pyside_module(QtScript QtScript_libraries QtScript_deps QtScript_typesystem_path - QtScript_SRC - "") + QtScript_SRC) diff --git a/PySide/QtScriptTools/CMakeLists.txt b/PySide/QtScriptTools/CMakeLists.txt index 575dcc3..a110f15 100644 --- a/PySide/QtScriptTools/CMakeLists.txt +++ b/PySide/QtScriptTools/CMakeLists.txt @@ -33,5 +33,4 @@ create_pyside_module(QtScriptTools QtScriptTools_libraries QtScriptTools_deps QtScriptTools_typesystem_path - QtScriptTools_SRC - "") + QtScriptTools_SRC) diff --git a/PySide/QtSql/CMakeLists.txt b/PySide/QtSql/CMakeLists.txt index 7da42d4..204058e 100644 --- a/PySide/QtSql/CMakeLists.txt +++ b/PySide/QtSql/CMakeLists.txt @@ -43,5 +43,4 @@ create_pyside_module(QtSql QtSql_libraries QtSql_deps QtSql_typesystem_path - QtSql_SRC - "") + QtSql_SRC) diff --git a/PySide/QtSvg/CMakeLists.txt b/PySide/QtSvg/CMakeLists.txt index b1e5477..a1e3eb6 100644 --- a/PySide/QtSvg/CMakeLists.txt +++ b/PySide/QtSvg/CMakeLists.txt @@ -31,5 +31,4 @@ create_pyside_module(QtSvg QtSvg_libraries QtSvg_deps QtSvg_typesystem_path - QtSvg_SRC - "") + QtSvg_SRC) diff --git a/PySide/QtTest/CMakeLists.txt b/PySide/QtTest/CMakeLists.txt index fea841d..aaf4dd5 100644 --- a/PySide/QtTest/CMakeLists.txt +++ b/PySide/QtTest/CMakeLists.txt @@ -29,5 +29,4 @@ create_pyside_module(QtTest QtTest_libraries QtTest_deps QtTest_typesystem_path - QtTest_SRC - "") + QtTest_SRC) diff --git a/PySide/QtUiTools/CMakeLists.txt b/PySide/QtUiTools/CMakeLists.txt index 195cb81..5c68b11 100644 --- a/PySide/QtUiTools/CMakeLists.txt +++ b/PySide/QtUiTools/CMakeLists.txt @@ -33,6 +33,5 @@ create_pyside_module(QtUiTools QtUiTools_libraries QtUiTools_deps QtUiTools_typesystem_path - QtUiTools_SRC - "") + QtUiTools_SRC) diff --git a/PySide/QtWebKit/CMakeLists.txt b/PySide/QtWebKit/CMakeLists.txt index 83445db..c13a04a 100644 --- a/PySide/QtWebKit/CMakeLists.txt +++ b/PySide/QtWebKit/CMakeLists.txt @@ -63,6 +63,5 @@ create_pyside_module(QtWebKit QtWebKit_libraries QtWebKit_deps QtWebKit_typesystem_path - QtWebKit_SRC - "") + QtWebKit_SRC) diff --git a/PySide/QtXml/CMakeLists.txt b/PySide/QtXml/CMakeLists.txt index a06c710..5d9c6a8 100644 --- a/PySide/QtXml/CMakeLists.txt +++ b/PySide/QtXml/CMakeLists.txt @@ -56,5 +56,4 @@ create_pyside_module(QtXml QtXml_libraries QtXml_deps QtXml_typesystem_path - QtXml_SRC - "") + QtXml_SRC) diff --git a/PySide/QtXmlPatterns/CMakeLists.txt b/PySide/QtXmlPatterns/CMakeLists.txt index 0d789ff..85f238e 100644 --- a/PySide/QtXmlPatterns/CMakeLists.txt +++ b/PySide/QtXmlPatterns/CMakeLists.txt @@ -45,6 +45,5 @@ create_pyside_module(QtXmlPatterns QtXmlPatterns_libraries QtXmlPatterns_deps QtXmlPatterns_typesystem_path - QtXmlPatterns_SRC - "") + QtXmlPatterns_SRC) diff --git a/PySide/phonon/CMakeLists.txt b/PySide/phonon/CMakeLists.txt index a3f32d2..2adb25d 100644 --- a/PySide/phonon/CMakeLists.txt +++ b/PySide/phonon/CMakeLists.txt @@ -5,6 +5,10 @@ if (NOT QT_PHONON_INCLUDE_DIR AND CMAKE_HOST_APPLE) set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers") endif () +set(phonon_OPTIONAL_SRC ) +set(phonon_DROPPED_ENTRIES ) +check_qt_class(phonon VideoCaptureDevice phonon_OPTIONAL_SRC phonon_DROPPED_ENTRIES Phonon ObjectDescription) + set(phonon_SRC ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractaudiooutput_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractmediastream_wrapper.cpp @@ -42,14 +46,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumefaderinterface_wrapper.cp ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumeslider_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_notifierwrapper_wrapper.cpp +${phonon_OPTIONAL_SRC} ) -set(TARGET_TYPESYSTEM "${CMAKE_CURRENT_BINARY_DIR}/typesystem_phonon.xml") -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_phonon.xml" - "${TARGET_TYPESYSTEM}" @ONLY) - -check_qt_class("phonon" "VideoCaptureDevice" phonon_SRC ${TARGET_TYPESYSTEM} "Phonon" "ObjectDescription") - set(phonon_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}") set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR} ${QT_QTCORE_INCLUDE_DIR} @@ -74,4 +73,5 @@ create_pyside_module(phonon phonon_deps phonon_typesystem_path phonon_SRC - ${TARGET_TYPESYSTEM}) + "" + phonon_DROPPED_ENTRIES) diff --git a/PySide/phonon/optional/VideoCaptureDevice.xml b/PySide/phonon/optional/VideoCaptureDevice.xml deleted file mode 100644 index 9b3e554..0000000 --- a/PySide/phonon/optional/VideoCaptureDevice.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/PySide/phonon/typesystem_phonon.xml b/PySide/phonon/typesystem_phonon.xml index a954fcd..c10fcc0 100644 --- a/PySide/phonon/typesystem_phonon.xml +++ b/PySide/phonon/typesystem_phonon.xml @@ -231,6 +231,15 @@ - + + + + + + + + + + diff --git a/cmake/Macros/PySideModules.cmake b/cmake/Macros/PySideModules.cmake index 8b1d20a..fb74c5b 100644 --- a/cmake/Macros/PySideModules.cmake +++ b/cmake/Macros/PySideModules.cmake @@ -1,6 +1,18 @@ -macro(create_pyside_module module_name module_include_dir module_libraries module_deps module_typesystem_path module_sources typesystem_name) +macro(create_pyside_module module_name module_include_dir module_libraries module_deps module_typesystem_path module_sources) string(TOLOWER ${module_name} _module) string(REGEX REPLACE ^qt "" _module ${_module}) + + if(${ARGC} GREATER 6) + set (typesystem_name ${ARGV6}) + else() + set (typesystem_name "") + endif() + if(${ARGC} GREATER 7) + string(REPLACE ";" "\\;" dropped_entries "${${ARGV7}}") + else() + set (dropped_entries "") + endif() + if (NOT EXISTS ${typesystem_name}) set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml) else() @@ -16,11 +28,12 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt ${typesystem_path} --api-version=${SUPPORTED_QT_VERSION} + --drop-type-entries="${dropped_entries}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for ${module_name}...") include_directories(${module_name} ${${module_include_dir}} ${pyside_SOURCE_DIR}) - add_library(${module_name} MODULE ${${module_sources}} ${${ARGN}}) + add_library(${module_name} MODULE ${${module_sources}}) set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR}) if(WIN32) set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd") @@ -43,25 +56,8 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems) endmacro() -macro(append_class_xml commom_xml class_xml) - INCLUDE(FindPythonInterp) - set(REPLACE_PROGRAM "import string; \\ - commomFile = open('${commom_xml}', 'r'); \\ - commomData = commomFile.read(); \\ - commomFile.close(); \\ - objectFile = open('${class_xml}', 'r'); \\ - objectData = objectFile.read(); \\ - objectFile.close(); \\ - commomData = string.replace(commomData, '', '%s\\n' % objectData); \\ - commomFile = open('${commom_xml}', 'w'); \\ - commomFile.write(commomData); \\ - commomFile.close();") - execute_process( - COMMAND ${PYTHON_EXECUTABLE} -c "${REPLACE_PROGRAM}") -endmacro() - -#macro(check_qt_class_with_namespace module namespace class global_sources commom_xml class_xml [namespace] [module]) -macro(check_qt_class module class global_sources commom_xml) +#macro(check_qt_class_with_namespace module namespace class optional_source_files dropped_entries [namespace] [module]) +macro(check_qt_class module class optional_source_files dropped_entries) if (${ARGC} GREATER 4) set (namespace ${ARGV4}) string(TOLOWER ${namespace} _namespace) @@ -82,7 +78,9 @@ macro(check_qt_class module class global_sources commom_xml) endif () if (DEFINED PYSIDE_${class}) if (PYSIDE_${class}) - list(APPEND ${global_sources} ${_cppfile}) + list(APPEND ${optional_source_files} ${_cppfile}) + else() + list(APPEND ${dropped_entries} PySide.${module}.${class}) endif() else() if (NOT ${namespace} STREQUAL "" ) @@ -108,10 +106,10 @@ macro(check_qt_class module class global_sources commom_xml) set("PYSIDE_${class}" ${Q_WORKS} CACHE STRING "Has ${class} class been found?") if(Q_WORKS) message(STATUS "Checking for ${class} in ${module} -- found") - list(APPEND ${global_sources} ${_cppfile}) - append_class_xml(${commom_xml} "${CMAKE_CURRENT_SOURCE_DIR}/optional/${class}.xml") + list(APPEND ${optional_source_files} ${_cppfile}) else() message(STATUS "Checking for ${class} in ${module} -- not found") + list(APPEND ${dropped_entries} PySide.${module}.${class}) endif() endif() endmacro()