From f98d424bc3e05100bab64160ab4adf182db83b18 Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Fri, 15 Sep 2017 14:21:24 -0400 Subject: [PATCH] vcxproj.pm: fix AdditionalDependencies Add .LIBs for zlib and openssl to to help linker when building with VS2017. This closes https://github.com/git-for-windows/git/issues/1234 Note: this patch still leaves a couple of TODOs: - It should be possible to add GEN.DEPS\lib to and then just set to the library basenames. - Likewise, you should be able to copy GEN.DEPS\bin\*.dll to the destination directory rather than using the full paths in the $afterTargets lines. (This is in line with items in referencing GEN.DEPS\include.) Signed-off-by: Jeff Hostetler Signed-off-by: Johannes Schindelin --- contrib/buildsystems/Generators/Vcxproj.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/buildsystems/Generators/Vcxproj.pm b/contrib/buildsystems/Generators/Vcxproj.pm index bcbb71410b..ae443449aa 100644 --- a/contrib/buildsystems/Generators/Vcxproj.pm +++ b/contrib/buildsystems/Generators/Vcxproj.pm @@ -163,6 +163,13 @@ sub createProject { } elsif ($needsCurl && $1 eq 'expat') { # libexpat is only available targeting v100 and v110 $libs .= ";$rel_dir\\compat\\vcbuild\\GEN.PKGS\\$1.$2\\build\\native\\lib\\v110\\\$(Platform)\\Release\\dynamic\\utf8\\libexpat.lib"; + } elsif ($1 eq 'zlib') { + # zlib + $libs .= ";$rel_dir\\compat\\vcbuild\\GEN.PKGS\\$1.v140.windesktop.msvcstl.dyn.rt-dyn.$2\\lib\\native\\v140\\windesktop\\msvcstl\\dyn\\rt-dyn\\x64\\RelWithDebInfo\\zlib.lib"; + } elsif ($1 eq 'openssl') { + # openssl + $libs .= ";$rel_dir\\compat\\vcbuild\\GEN.PKGS\\$1.v140.windesktop.msvcstl.dyn.rt-dyn.x64.$2\\lib\\native\\v140\\windesktop\\msvcstl\\dyn\\rt-dyn\\x64\\release\\libeay32.lib"; + $libs .= ";$rel_dir\\compat\\vcbuild\\GEN.PKGS\\$1.v140.windesktop.msvcstl.dyn.rt-dyn.x64.$2\\lib\\native\\v140\\windesktop\\msvcstl\\dyn\\rt-dyn\\x64\\release\\ssleay32.lib"; } next if ($1 =~ /^(zlib$|openssl(?!.*(x64|x86)$))/); my $targetsFile = "$rel_dir\\compat\\vcbuild\\GEN.PKGS\\$1.$2\\build\\native\\$1.targets";