summaryrefslogtreecommitdiff
path: root/src/tools/msvc/Project.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:38:48 -0400
commit6ca51b155256b2e814b0238119a70545e78106ec (patch)
tree2c3f2abd176fb46cddd8ce56b01b8b5e04acc282 /src/tools/msvc/Project.pm
parent8b77f783b7584e8cbcf0aa42c7f176f7f23937ae (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/Project.pm')
-rw-r--r--src/tools/msvc/Project.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm
index 4ce09418537..de0a2312e93 100644
--- a/src/tools/msvc/Project.pm
+++ b/src/tools/msvc/Project.pm
@@ -126,7 +126,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 = '&quot;' . $lib . "&quot;";
}