aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/cmake
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/pyside2/cmake
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/pyside2/cmake')
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
index f4bfd8858..daa5401a1 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})