aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-06-22 14:58:06 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2017-06-23 08:27:29 +0000
commit7d8023b9c100556d9a2f3ea6efa2ef60c185d425 (patch)
treebb10be0eeb9dc4958c735a9966f8f2e5f59267f7 /sources
parenta2ad108d53330f6ea19fa69715a1d76cda21b254 (diff)
Fix compile tests to include correct module include dirs
Also include the optional QtNetwork sources, so that QSsl* class bindings are properly generated. Thus the optional QtWidgets and QtNetwork classes should be picked up. Change-Id: Id4d21dc577f2b551dce83999be76cdfd9d0b88d2 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside2/PySide2/QtNetwork/CMakeLists.txt2
-rw-r--r--sources/pyside2/PySide2/QtWidgets/CMakeLists.txt26
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake7
3 files changed, 18 insertions, 17 deletions
diff --git a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
index 26518991..f01aaf77 100644
--- a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
@@ -2,6 +2,7 @@ project(QtNetwork)
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)
@@ -37,6 +38,7 @@ ${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
)
diff --git a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
index 84dec8fa..5c155b94 100644
--- a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
@@ -6,19 +6,19 @@ set(QtWidgets_DROPPED_ENTRIES )
## gone check_qt_class(Qt5Widgets QAbstractPageSetupDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
## actually, all the printer stuff is in QtPrintSupport
## XXX check if these conditionals need to be done elsewhere
-check_qt_class(Qt5Widgets QAbstractPrintDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QGtkStyle QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QPageSetupDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QPrintDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QPrintEngine QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QPrintPreviewDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QPrintPreviewWidget QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QPrinter QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QPrinterInfo QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QSessionManager QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QSizeGrip QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QSystemTrayIcon QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
-check_qt_class(Qt5Widgets QMacStyle QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QAbstractPrintDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QGtkStyle QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QPageSetupDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QPrintDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QPrintEngine QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QPrintPreviewDialog QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QPrintPreviewWidget QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QPrinter QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QPrinterInfo QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QSessionManager QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QSizeGrip QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QSystemTrayIcon QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
+check_qt_class(QtWidgets QMacStyle QtWidgets_OPTIONAL_SRC QtWidgets_DROPPED_ENTRIES)
set(QtWidgets_SRC
${QtWidgets_GEN_DIR}/qabstractbutton_wrapper.cpp
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
index f4bfd885..daa5401a 100644
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside2/cmake/Macros/PySideModules.cmake
@@ -133,7 +133,8 @@ macro(check_qt_class module class optional_source_files dropped_entries)
set (include_file ${class})
endif ()
string(TOLOWER ${class} _class)
- string(TOUPPER ${module} _module)
+ # Remove the "Qt" prefix.
+ string(SUBSTRING ${module} 2 -1 _module_no_qt_prefix)
if (_namespace)
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide2/${module}/${_namespace}_${_class}_wrapper.cpp)
else ()
@@ -160,9 +161,7 @@ macro(check_qt_class module class optional_source_files dropped_entries)
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
${SRC_FILE}
CMAKE_FLAGS
- "-DLINK_LIBRARIES=${QT_${_module}_LIBRARY}"
- "-DLINK_DIRECTORIES=${QT_LIBRARY_DIR}"
- "-DINCLUDE_DIRECTORIES=${QT_INCLUDE_DIR};${QT_${_module}_INCLUDE_DIR}"
+ "-DINCLUDE_DIRECTORIES=${QT_INCLUDE_DIR};${Qt5${_module_no_qt_prefix}_INCLUDE_DIRS}"
OUTPUT_VARIABLE OUTPUT)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCheckQtClassTest.log ${OUTPUT})