aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
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