Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b64ff9c

Browse files
committed
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.
1 parent 55cd9a8 commit b64ff9c

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/tools/msvc/Solution.pm

+14-4
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,20 @@ sub AddProject
523523
if ($self->{options}->{openssl})
524524
{
525525
$proj->AddIncludeDir($self->{options}->{openssl} . '\include');
526-
$proj->AddLibrary(
527-
$self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1);
528-
$proj->AddLibrary(
529-
$self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1);
526+
if (-e "$self->{options}->{openssl}/lib/VC/ssleayMD.lib")
527+
{
528+
$proj->AddLibrary(
529+
$self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1);
530+
$proj->AddLibrary(
531+
$self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1);
532+
}
533+
else
534+
{
535+
$proj->AddLibrary(
536+
$self->{options}->{openssl} . '\lib\ssleay32.lib', 1);
537+
$proj->AddLibrary(
538+
$self->{options}->{openssl} . '\lib\libeay32.lib', 1);
539+
}
530540
}
531541
if ($self->{options}->{nls})
532542
{

0 commit comments

Comments
 (0)