Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe39a08

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 cee7238 commit fe39a08

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/tools/msvc/Solution.pm

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,20 @@ sub AddProject
503503
if ($self->{options}->{openssl})
504504
{
505505
$proj->AddIncludeDir($self->{options}->{openssl} . '\include');
506-
$proj->AddLibrary(
507-
$self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1);
508-
$proj->AddLibrary(
509-
$self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1);
506+
if (-e "$self->{options}->{openssl}/lib/VC/ssleayMD.lib")
507+
{
508+
$proj->AddLibrary(
509+
$self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1);
510+
$proj->AddLibrary(
511+
$self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1);
512+
}
513+
else
514+
{
515+
$proj->AddLibrary(
516+
$self->{options}->{openssl} . '\lib\ssleay32.lib', 1);
517+
$proj->AddLibrary(
518+
$self->{options}->{openssl} . '\lib\libeay32.lib', 1);
519+
}
510520
}
511521
if ($self->{options}->{nls})
512522
{

0 commit comments

Comments
 (0)