aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-04-30 10:30:36 +0200
committerEike Ziller <eike.ziller@qt.io>2020-05-05 08:03:41 +0000
commitf574f478ebc1d78dc496356a6c45c33189de1cc7 (patch)
tree01d35c9d3e9abede73095d93f9cdb504946f72b0 /scripts
parentff925d85e9bb1cfc2018d28ed738b015d7a96c55 (diff)
build_plugin.py: Add option to pass additional arguments to CMake
Change-Id: Ifab717fdca9b8c5d4585146e552a60fc66c08d74 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_plugin.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/build_plugin.py b/scripts/build_plugin.py
index 45c16765d3..97c4829745 100755
--- a/scripts/build_plugin.py
+++ b/scripts/build_plugin.py
@@ -48,6 +48,9 @@ def get_arguments():
parser.add_argument('--output-path', help='Output path for resulting 7zip files')
parser.add_argument('--add-path', help='Adds a CMAKE_PREFIX_PATH to the build',
action='append', dest='prefix_paths', default=[])
+ parser.add_argument('--add-config', help=('Adds the argument to the CMake configuration call. '
+ 'Use "--add-config=-DSOMEVAR=SOMEVALUE" if the argument begins with a dash.'),
+ action='append', dest='config_args', default=[])
parser.add_argument('--deploy', help='Installs the "Dependencies" component of the plugin.',
action='store_true', default=False)
parser.add_argument('--debug', help='Enable debug builds', action='store_true', default=False)
@@ -82,6 +85,7 @@ def build(args, paths):
with open(os.path.join(paths.result, args.name + '.7z.git_sha'), 'w') as f:
f.write(ide_revision)
+ cmake_args += args.config_args
common.check_print_call(cmake_args + [paths.src], paths.build)
common.check_print_call(['cmake', '--build', '.'], paths.build)
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, '--strip'],