diff options
-rw-r--r-- | build_scripts/main.py | 9 | ||||
-rw-r--r-- | build_scripts/options.py | 1 | ||||
-rw-r--r-- | setup.py | 3 | ||||
-rw-r--r-- | sources/pyside2/CMakeLists.txt | 8 |
4 files changed, 21 insertions, 0 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index fd5998480..b22249abb 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -967,6 +967,15 @@ class pyside_build(_build): moduleSubSet += ';' moduleSubSet += m cmake_cmd.append("-DMODULES={}".format(moduleSubSet)) + if OPTION_SKIP_MODULES: + skip_modules = '' + for m in OPTION_SKIP_MODULES.split(','): + if m.startswith('Qt'): + m = m[2:] + if skip_modules: + skip_modules += ';' + skip_modules += m + cmake_cmd.append("-DSKIP_MODULES={}".format(skip_modules)) # Add source location for generating documentation cmake_src_dir = OPTION_QT_SRC if OPTION_QT_SRC else qtSrcDir cmake_cmd.append("-DQT_SRC_DIR={}".format(cmake_src_dir)) diff --git a/build_scripts/options.py b/build_scripts/options.py index 6472c664d..80c9041e4 100644 --- a/build_scripts/options.py +++ b/build_scripts/options.py @@ -72,6 +72,7 @@ OPTION_REUSE_BUILD = has_option("reuse-build") OPTION_SKIP_CMAKE = has_option("skip-cmake") OPTION_SKIP_MAKE_INSTALL = has_option("skip-make-install") OPTION_SKIP_PACKAGING = has_option("skip-packaging") +OPTION_SKIP_MODULES = option_value("skip-modules") OPTION_MODULE_SUBSET = option_value("module-subset") OPTION_RPATH_VALUES = option_value("rpath") OPTION_QT_CONF_PREFIX = option_value("qt-conf-prefix") @@ -116,6 +116,9 @@ using `setup.py build`: --module-subset allows for specifying the Qt modules to be built. A minimal set is: --module-subset=Core,Gui,Test,Widgets + --skip-modules allows for specifying the Qt modules that will be + skipped during the build process. + For example: --skip-modules=WebEngineCore,WebEngineWidgets --reuse-build option allows recompiling only the modified sources and not the whole world, shortening development iteration time, --skip-cmake will reuse the already generated Makefiles (or diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt index 151d37f8b..e1ef529aa 100644 --- a/sources/pyside2/CMakeLists.txt +++ b/sources/pyside2/CMakeLists.txt @@ -353,6 +353,14 @@ if (NOT MODULES) set(MODULES "${ALL_ESSENTIAL_MODULES};${ALL_OPTIONAL_MODULES}") endif() +# Removing from the MODULES list the items that were defined with +# -DSKIP_MODULES on command line +if (SKIP_MODULES) + foreach(s ${SKIP_MODULES}) + list(REMOVE_ITEM MODULES ${s}) + endforeach() +endif() + foreach(m ${MODULES}) COLLECT_MODULE_IF_FOUND(${m}) endforeach() |