Hi,
The attached self-documented patch fixes build on Windows in case when path to Python has embedded spaces.
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index d1d0aed07e..76834f5188 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -495,7 +495,7 @@ sub mkvcbuild my $pythonprog = "import sys;print(sys.prefix);" . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; my $prefixcmd = - $solution->{options}->{python} . "\\python -c \"$pythonprog\""; + "\"$solution->{options}->{python}\\python\" -c \"$pythonprog\""; my $pyout = `$prefixcmd`; die "Could not query for python version!\n" if $?; my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index b5d1dc6e89..28893f072d 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -132,10 +132,9 @@ sub AddLibrary { my ($self, $lib, $dbgsuffix) = @_; - if ($lib =~ m/\s/) - { - $lib = '"' . $lib . """; - } + # Since VC automatically quotes paths specified as the data of + # <AdditionalDependencies> in VC project file, it's mistakably + # to quote them here. Thus, it's okay if $lib contains spaces. push @{ $self->{libraries} }, $lib; if ($dbgsuffix)