diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2017-06-05 14:24:42 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2017-06-05 14:27:59 -0400 |
commit | b64ff9c5af1e7e8c665f6fd76cecb0e3e82b0921 (patch) | |
tree | 21a56cf18287d92c16c749a510fcf2485b1fcf8b /src | |
parent | 55cd9a8ff6a7cc244a33776c447cb0f0f10b6b94 (diff) | |
download | postgresql-b64ff9c5af1e7e8c665f6fd76cecb0e3e82b0921.tar.gz postgresql-b64ff9c5af1e7e8c665f6fd76cecb0e3e82b0921.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/msvc/Solution.pm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 666605b47b9..8191a40ea50 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}) { |