aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/cmake/executor.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py
index fa09c4d..9bed737 100644
--- a/mesonbuild/cmake/executor.py
+++ b/mesonbuild/cmake/executor.py
@@ -197,6 +197,12 @@ class CMakeExecutor:
c_comp, c_launcher = choose_compiler('c')
cxx_comp, cxx_launcher = choose_compiler('cpp')
+ # on Windows, choose_compiler returns path with \ as separator - replace by / before writing to CMAKE file
+ c_comp = c_comp.replace('\\', '/')
+ c_launcher = c_launcher.replace('\\', '/')
+ cxx_comp = cxx_comp.replace('\\', '/')
+ cxx_launcher = cxx_launcher.replace('\\', '/')
+
# Reset the CMake cache
with open('{}/CMakeCache.txt'.format(build_dir), 'w') as fp:
fp.write('CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1\n')