diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index 0d3554659b..04fa74b7a9 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -132,7 +132,8 @@ sub AddLibrary { my ($self, $lib, $dbgsuffix) = @_; - if ($lib =~ m/\s/) + # quote lib name if it has spaces and isn't already quoted + if ($lib =~ m/\s/ && $lib !~ m/^[&]quot;/) { $lib = '"' . $lib . """; } diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index c59cfd5023..c857ae88e3 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -129,8 +129,9 @@ sub GetOpenSSLVersion # Attempt to get OpenSSL version and location. This assumes that # openssl.exe is in the specified directory. + # Quote the .exe name in case it has spaces my $opensslcmd = - $self->{options}->{openssl} . "\\bin\\openssl.exe version 2>&1"; + qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1); my $sslout = `$opensslcmd`; $? >> 8 == 0