Build scripts: Fix path format for cmake calls

Make sure to pass posix style paths to CMAKE_PREFIX_PATH,
CMAKE_MODULE_PATH and CMAKE_INSTALL_PREFIX. Otherwise this can lead to
funny "Unknown control sequence \U" kind of errors.

Follow-up of fceaff1a6f

Change-Id: I1c8445f9c298a17115bca6b42f099a99e33d6de2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Eike Ziller
2020-11-10 09:32:45 +01:00
parent ad48f2639c
commit 88498101a0
3 changed files with 11 additions and 3 deletions
+2 -1
View File
@@ -66,11 +66,12 @@ def build(args, paths):
if not os.path.exists(paths.result):
os.makedirs(paths.result)
prefix_paths = [os.path.abspath(fp) for fp in args.prefix_paths] + [paths.qt_creator, paths.qt]
prefix_paths = [common.to_posix_path(fp) for fp in prefix_paths]
build_type = 'Debug' if args.debug else 'Release'
cmake_args = ['cmake',
'-DCMAKE_PREFIX_PATH=' + ';'.join(prefix_paths),
'-DCMAKE_BUILD_TYPE=' + build_type,
'-DCMAKE_INSTALL_PREFIX=' + paths.install,
'-DCMAKE_INSTALL_PREFIX=' + common.to_posix_path(paths.install),
'-G', 'Ninja']
# force MSVC on Windows, because it looks for GCC in the PATH first,