In the prependModulePath(args) function when running on windows the paths are not escaped and cmake is choking on the windows \ path that is returned from const MODULE_PATH = path.resolve(__dirname, '..', 'cmake');.
By modifying the function with:
if (WINDOWS)
paths = paths.replace(/\\/g, "/");
out[1] = `CMAKE_MODULE_PATH=${paths}`;
CMake is able to handle the path and work properly.
I am not certain of the proper fix here as it appears that __dirname is working correctly on windows but CMake requires additional escaping or the use of the / to handle the string properly.
In the
prependModulePath(args)
function when running on windows the paths are not escaped and cmake is choking on the windows\
path that is returned fromconst MODULE_PATH = path.resolve(__dirname, '..', 'cmake');
.By modifying the function with:
CMake is able to handle the path and work properly.
I am not certain of the proper fix here as it appears that
__dirname
is working correctly on windows but CMake requires additional escaping or the use of the/
to handle the string properly.