aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/cmake
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-02 14:18:03 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-06 07:56:25 +0000
commitf2063ee4737f90c5d412a9a328672fde32b033eb (patch)
treebe06749b135fd45a9ca5b0e1d213ef743883dcf5 /sources/pyside2/cmake
parent0de4dffa0c5abc80df7063daf6bc9d1754891a9d (diff)
PySide2: Simplify typesystem path handling
Modify the typesystem.xml files such that all dependent files are loaded via module (for example, QtCore/typesystem_core.xml). As a result, it is no longer necessary to add each dependent directory to the typesystem path; it is sufficient to pass the binary and source path of PySide2 and the source directory of the Qt module only. This requires rewriting the dependency checking for --reuse-build so that it loops over the source directories of the dependent Qt modules. Change-Id: Ib234c2673f4ee93cc8a3282fac69bcfcfaebd0ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2/cmake')
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake15
1 files changed, 8 insertions, 7 deletions
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
index 2f0917f7f..9c39980cb 100644
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside2/cmake/Macros/PySideModules.cmake
@@ -54,15 +54,14 @@ macro(create_pyside_module
# First add the main file.
set(total_type_system_files ${typesystem_path})
- # Transform the path separator list back into a cmake list (so from a:b:c to a;b;c)
- unmake_path(list_of_paths ${${module_typesystem_path}})
+ get_filename_component(typesystem_root "${CMAKE_CURRENT_SOURCE_DIR}" DIRECTORY)
- # Collect all XML files, in each given path, and append them to the final total list.
- foreach(type_system_files_path ${list_of_paths})
- set(glob_expression "${type_system_files_path}/*.xml")
+ set(deps ${module_name} ${${module_deps}})
+ foreach(dep ${deps})
+ set(glob_expression "${typesystem_root}/${dep}/*.xml")
file(GLOB type_system_files ${glob_expression})
set(total_type_system_files ${total_type_system_files} ${type_system_files})
- endforeach(type_system_files_path)
+ endforeach(dep)
# Remove any possible duplicates.
list(REMOVE_DUPLICATES total_type_system_files)
@@ -81,12 +80,14 @@ macro(create_pyside_module
# Transform the path separators into something shiboken understands.
make_path(shiboken_include_dirs ${shiboken_include_dirs})
+ get_filename_component(pyside_binary_dir ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
+
add_custom_command(OUTPUT ${${module_sources}}
COMMAND "${SHIBOKEN_BINARY}" ${GENERATOR_EXTRA_FLAGS}
"${pyside2_BINARY_DIR}/${module_name}_global.h"
--include-paths=${shiboken_include_dirs}
${shiboken_framework_include_dirs_option}
- --typesystem-paths=${pyside2_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}
+ --typesystem-paths=${pyside_binary_dir}${PATH_SEP}${pyside2_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
${typesystem_path}