diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-12-15 13:49:27 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-12-15 13:51:01 +0000 |
commit | 13db647329f4f64ceb1094c1036e7a4ad8c6413e (patch) | |
tree | 3f9032654364179beabe9b25cad344ad1f76d6ea /scripts | |
parent | ad505aad5936fdf2eaf29dd91731e0900d1ab6d9 (diff) |
build_plugin.py: Add --add-module-path option
Like we have for build.py
Change-Id: I8450b81edcdf10300985762153cd5750d9ddcd59
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_plugin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/build_plugin.py b/scripts/build_plugin.py index 73d715331a8..0a0061e8735 100755 --- a/scripts/build_plugin.py +++ b/scripts/build_plugin.py @@ -49,6 +49,8 @@ def get_arguments(): parser.add_argument('--output-path', help='Output path for resulting 7zip files') 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. ' @@ -91,6 +93,10 @@ def build(args, paths): '-DCMAKE_INSTALL_PREFIX=' + common.to_posix_path(paths.install), '-G', 'Ninja'] + if args.module_paths: + module_paths = [common.to_posix_path(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 |