Skip to content

Commit

Permalink
fixup! contrib/buildsystems: support modern Visual Studio project def…
Browse files Browse the repository at this point in the history
…initions

Turns out that the <AdditionalLibraryDirectories> directive is
unnecessary, as we specify our dependencies with full path anyway.

It is even detrimental, as the flags we get from the current `make
MSVC=1` dry-run include architecture-specific libraries, which make
32-bit builds fail when the .vcxproj files were generated in a 64-bit
setup. These 32-bit builds can be triggered e.g. by calling

	msbuild /p:Configuration=Release;Platform=x86 git.sln

in an MSBuild Command Prompt.

This fixes #1104.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Apr 2, 2017
1 parent 59b761d commit e07d717
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions contrib/buildsystems/Generators/Vcxproj.pm
Expand Up @@ -131,7 +131,6 @@ sub createProject {
if (!$static_library) {
$libs = join(";", sort(grep /^(?!libgit\.lib|xdiff\/lib\.lib|vcs-svn\/lib\.lib|libcurl\.lib|libeay32\.lib|libiconv\.lib|ssleay32\.lib|zlib\.lib)/, @{$$build_structure{"$prefix${name}_LIBS"}}));
}
my $ldirs = join(";", map { /^-L(?!TCG)(.*)/ ? (File::Spec->file_name_is_absolute($1) ? $1 : "$rel_dir\\$1") : () } @{$$build_structure{"$prefix${name}_LFLAGS"}});

$defines =~ s/-D//g;
$defines =~ s/\"/&quot;/g;
Expand Down Expand Up @@ -245,7 +244,6 @@ sub createProject {
</Lib>
<Link>
<AdditionalDependencies>$libs;\$(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$ldirs</AdditionalLibraryDirectories>
<AdditionalOptions>invalidcontinue.obj %(AdditionalOptions)</AdditionalOptions>
<ManifestFile>$cdup\\compat\\win32\\git.manifest</ManifestFile>
<SubSystem>Console</SubSystem>
Expand Down

0 comments on commit e07d717

Please sign in to comment.