aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-10-27 12:53:07 +0100
committerEike Ziller <eike.ziller@qt.io>2020-10-28 13:57:59 +0000
commit30017685e7307c6246cc1ac6ef926da4352f6393 (patch)
tree957afbefe11852e288538bb504ca827aed6cfcfa /scripts
parent3476b8aa67b5c03a41e6a6bd3823f8e07581bf0d (diff)
build.py: add --add-module-path
Which prepends a path to CMAKE_MODULE_PATH which is required for branding. Task-number: QTCREATORBUG-22488 Change-Id: I6b0015778d8ceec7183740e5b70eaafd220a3bdf Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/build.py b/scripts/build.py
index 2ffb35dda1..50247030fd 100755
--- a/scripts/build.py
+++ b/scripts/build.py
@@ -93,6 +93,8 @@ def get_arguments():
action='store_true', default=False)
parser.add_argument('--add-path', help='Prepends a CMAKE_PREFIX_PATH to the build',
action='append', dest='prefix_paths', default=[])
+ parser.add_argument('--add-module-path', help='Prepends a CMAKE_MODULE_PATH to the build',
+ action='append', dest='module_paths', default=[])
parser.add_argument('--add-make-arg', help='Passes the argument to the make tool.',
action='append', dest='make_args', default=[])
parser.add_argument('--add-config', help=('Adds the argument to the CMake configuration call. '
@@ -128,6 +130,10 @@ def build_qtcreator(args, paths):
if args.python3:
cmake_args += ['-DPYTHON_EXECUTABLE=' + args.python3]
+ if args.module_paths:
+ module_paths = [os.path.abspath(fp) for fp in args.module_paths]
+ cmake_args += ['-DCMAKE_MODULE_PATH=' + ';'.join(module_paths)]
+
# force MSVC on Windows, because it looks for GCC in the PATH first,
# even if MSVC is first mentioned in the PATH...
# TODO would be nicer if we only did this if cl.exe is indeed first in the PATH