summaryrefslogtreecommitdiff
path: root/src/tools/msvc/Solution.pm
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2019-10-04 15:34:40 -0400
committerAndrew Dunstan <andrew@dunslane.net>2019-10-04 15:39:27 -0400
commitec38d2311124b7e59a1dad20a814f705884bd38a (patch)
tree28e87fbde29212bcaae8f48869bd7b15b75cc23e /src/tools/msvc/Solution.pm
parent6c3b6406db3b132b84d7be6fe838da9d46cd02f8 (diff)
Handle spaces in OpenSSL install location for MSVC
First, make sure that the .exe name is quoted when trying to get the version number. Also, don't quote the lib name for using in the project files if it's already been quoted. This second change applies to all libraries, not just OpenSSL. This has clearly been broken forever, so backpatch to all live branches.
Diffstat (limited to 'src/tools/msvc/Solution.pm')
-rw-r--r--src/tools/msvc/Solution.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 51711c2bff9..9d2345689af 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -125,8 +125,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