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

View File

@@ -40,6 +40,12 @@ def is_linux_platform():
def is_mac_platform():
return sys.platform.startswith('darwin')
def to_posix_path(path):
if is_windows_platform():
# should switch to pathlib from python3
return path.replace('\\', '/')
return path
def check_print_call(command, workdir, env=None):
print('------------------------------------------')
print('COMMAND:')