cmake: Do not split CMAKE_PREFIX_PATH with ':' on Windows
This is obviously wrong, since on Windows ':' is in the drive letter.
Causes us to call cmake with `-DCMAKE_PREFIX_PATH=c;\foo\bar`.
@@ -69,6 +69,11 @@ class CMakeExecutor:
self.environment.is_cross_build(),
'CMAKE_PREFIX_PATH')
if env_pref_path is not None:
+ if mesonlib.is_windows():
+ # Cannot split on ':' on Windows because its in the drive letter
+ env_pref_path = env_pref_path.split(os.pathsep)
+ else:
+ # https://github.com/mesonbuild/meson/issues/7294
env_pref_path = re.split(r':|;', env_pref_path)
env_pref_path = [x for x in env_pref_path if x] # Filter out empty strings
if not self.prefix_paths:
