diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-11-07 16:14:47 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-11-14 10:48:50 +0000 |
commit | 7daa59703916ebd40eeac83eecc90b73f76f4b8b (patch) | |
tree | 4e92d2c25506c8a64221b3732f8ece180177ee0b /setup.py | |
parent | cb8cb895a9bd8620d3e26b39254b3212b07113b2 (diff) |
Allow building subset of Qt modules
Collect the list of essential and optional modules in list variables
and concatenate them to a list variable MODULES unless its value was
passed in on the command line with -D.
Remove the additional parameter indicating the module type to
COLLECT_MODULE_IF_FOUND() and let it determine that by checking
the essentials list instead.
Add a command line option --module-subset to setup.py which can be used
like "--module-subset=QtCore,QtGui,QtWidgets,QtTest" to specify the modules
to be built.
Change-Id: Ibb0fa16a8d9b0d7aeeaf8a8cfcbd50cb910ecc97
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -239,6 +239,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_MODULE_SUBSET = option_value("module-subset") if OPTION_QT_VERSION is None: OPTION_QT_VERSION = "5" @@ -829,6 +830,15 @@ class pyside_build(_build): cmake_cmd.append("-DPYTHON_EXECUTABLE=%s" % self.py_executable) cmake_cmd.append("-DPYTHON_INCLUDE_DIR=%s" % self.py_include_dir) cmake_cmd.append("-DPYTHON_LIBRARY=%s" % self.py_library) + if OPTION_MODULE_SUBSET: + moduleSubSet = '' + for m in OPTION_MODULE_SUBSET.split(','): + if m.startswith('Qt'): + m = m[2:] + if moduleSubSet: + moduleSubSet += ';' + moduleSubSet += m + cmake_cmd.append("-DMODULES=%s" % moduleSubSet) # Add source location for generating documentation if qtSrcDir: cmake_cmd.append("-DQT_SRC_DIR=%s" % qtSrcDir) |