From 614350a3ab73992f48c86e26552a2cbf030180e2 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Mon, 5 Jun 2017 14:24:42 -0400 Subject: [PATCH] Find openssl lib files in right directory for MSVC Some openssl builds put their lib files in a VC subdirectory, others do not. Cater for both cases. Backpatch to all live branches. From an offline discussion with Leonardo Cecchi. --- src/tools/msvc/Solution.pm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 70cd23b888..d91e0a0da6 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -523,10 +523,20 @@ sub AddProject if ($self->{options}->{openssl}) { $proj->AddIncludeDir($self->{options}->{openssl} . '\include'); - $proj->AddLibrary( - $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); - $proj->AddLibrary( - $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); + if (-e "$self->{options}->{openssl}/lib/VC/ssleayMD.lib") + { + $proj->AddLibrary( + $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); + $proj->AddLibrary( + $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); + } + else + { + $proj->AddLibrary( + $self->{options}->{openssl} . '\lib\ssleay32.lib', 1); + $proj->AddLibrary( + $self->{options}->{openssl} . '\lib\libeay32.lib', 1); + } } if ($self->{options}->{nls}) { -- 2.40.0