aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/executor.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-08-05 22:07:04 +0530
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-08-05 19:57:05 +0200
commitadbed4c636c295093f5d5da13eb9b433e592225c (patch)
tree1b6c80b2490b1723222b63db57f23c3d66995e41 /mesonbuild/cmake/executor.py
parenteeebfded853564c4a8c5a6ab7cc6a1d9331b0779 (diff)
downloadmeson-adbed4c636c295093f5d5da13eb9b433e592225c.zip
meson-adbed4c636c295093f5d5da13eb9b433e592225c.tar.gz
meson-adbed4c636c295093f5d5da13eb9b433e592225c.tar.bz2
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`.
Diffstat (limited to 'mesonbuild/cmake/executor.py')
-rw-r--r--mesonbuild/cmake/executor.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py
index 148a999..0075e06 100644
--- a/mesonbuild/cmake/executor.py
+++ b/mesonbuild/cmake/executor.py
@@ -69,7 +69,12 @@ class CMakeExecutor:
self.environment.is_cross_build(),
'CMAKE_PREFIX_PATH')
if env_pref_path is not None:
- env_pref_path = re.split(r':|;', env_pref_path)
+ 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:
self.prefix_paths = []