From f89b7effb50b6c94e941ee5cbbc33ab4f60d0f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= Date: Sat, 2 Nov 2019 09:33:42 +0100 Subject: Fix split of CMAKE_PREFIX_PATH under Windows Under Windows, the colon ':' is used after the drive letter. So, the colon should not be used as a list separator or for splitting, otherwise it could lead to paths in CMAKE_PREFIX_PATH with a semicolon ';' between the drive letter and the rest of the path, e.g: -DCMAKE_PREFIX_PATH=C;/foo/bar instead of -DCMAKE_PREFIX_PATH=C:/foo/bar Use os.pathsep instead of ':' to split the environmental variable CMAKE_PREFIX_PATH --- mesonbuild/dependencies/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 3c55a56..3bdc413 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -1114,8 +1114,8 @@ class CMakeDependency(ExternalDependency): pref_path = self.env.coredata.builtins_per_machine[self.for_machine]['cmake_prefix_path'].value if 'CMAKE_PREFIX_PATH' in os.environ: - env_pref_path = os.environ['CMAKE_PREFIX_PATH'].split(':') - env_pref_path = [x for x in env_pref_path if x] # Filter out enpty strings + env_pref_path = os.environ['CMAKE_PREFIX_PATH'].split(os.pathsep) + env_pref_path = [x for x in env_pref_path if x] # Filter out empty strings if not pref_path: pref_path = [] pref_path += env_pref_path -- cgit v1.1