Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS2017 vcxproj #1302

Merged
merged 2 commits into from Sep 18, 2017
Merged

VS2017 vcxproj #1302

merged 2 commits into from Sep 18, 2017

Conversation

jeffhostetler
Copy link

Here is a fix for building inside VS2017 using the generated SLN and VCXPROJ files in vs/master.
For some reason, the existing PERL-generated project files built fine using VS2015, but failed to
link when building with VS2017 (with unsatisfied references in zlib and then openssl).

The fix here, adds explicit .lib references to the AdditionalDependencies parameter. I left a TODO
in the commit message describing a possibly simpler fix.

@dscho Please see if this looks right to you. I managed to get everything to compile and link, but
I wasn't sure how you were using some of the project dependencies and error handling at the bottom
of the resulting vcxproj files, so you may want to refactor this. However you want to handle this is
fine with me. Thanks!

@jeffhostetler
Copy link
Author

Also, the PERL script always generates v140 / ToolVersion 14 files. I think we could use
the vs_ver field that I put in GIT-MSVC-GEN to decide that.

Toolset v120 corresponds to Visual Studio 2013. We already used
dependencies that were hardcoded to v140 (i.e. Visual Studio 2015), so
let's just remove the cruft.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add .LIBs for zlib and openssl to <AdditionalDependencies>
to help linker when building with VS2017.

This closes git-for-windows#1234

Note: this patch still leaves a couple of TODOs:

- It should be possible to add GEN.DEPS\lib to
  <AdditionalLibraryDependencies> and then just set
  <AdditionalDependencies> 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 <AdditionalIncludeDirectories>
referencing GEN.DEPS\include.)

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho merged commit 03faabc into git-for-windows:master Sep 18, 2017
@dscho
Copy link
Member

dscho commented Sep 18, 2017

Thanks for your contribution, this is excellent and also closes #1234.

Also, the PERL script always generates v140 / ToolVersion 14 files. I think we could use
the vs_ver field that I put in GIT-MSVC-GEN to decide that.

A valid point. However, my primary concern with the vcxproj is to build the vs/master branch so that Visual Studio users do not need the Git for Windows SDK, and it would be nice to support VS2015 users, still. So I kept this TODO separate for now.

dscho added a commit to git-for-windows/build-extra that referenced this pull request Sep 18, 2017
The `vs/master` branch [can now be built in Visual Studio
2017](git-for-windows/git#1302), too

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this pull request Sep 19, 2017
git-for-windows-ci pushed a commit that referenced this pull request Sep 20, 2017
dscho added a commit that referenced this pull request Sep 20, 2017
git-for-windows-ci pushed a commit that referenced this pull request Sep 21, 2017
git-for-windows-ci pushed a commit that referenced this pull request Sep 21, 2017
git-for-windows-ci pushed a commit that referenced this pull request Sep 26, 2017
git-for-windows-ci pushed a commit that referenced this pull request Sep 26, 2017
dscho added a commit that referenced this pull request Sep 26, 2017
@jeffhostetler jeffhostetler deleted the vs2017_vcxproj branch September 26, 2017 18:56
dscho added a commit that referenced this pull request Oct 17, 2017
dscho added a commit that referenced this pull request Oct 19, 2017
dscho added a commit that referenced this pull request Oct 19, 2017
dscho added a commit that referenced this pull request Oct 19, 2017
dscho added a commit that referenced this pull request Oct 19, 2017
dscho added a commit that referenced this pull request Oct 19, 2017
git-for-windows-ci pushed a commit that referenced this pull request Oct 20, 2017
git-for-windows-ci pushed a commit that referenced this pull request Oct 20, 2017
git-for-windows-ci pushed a commit that referenced this pull request Oct 20, 2017
dscho added a commit that referenced this pull request Oct 20, 2017
git-for-windows-ci pushed a commit that referenced this pull request Oct 21, 2017
dscho added a commit that referenced this pull request May 29, 2018
dscho added a commit that referenced this pull request May 29, 2018
PKRoma pushed a commit to PKRoma/git-for-windows that referenced this pull request Jun 22, 2018
PKRoma pushed a commit to PKRoma/git-for-windows that referenced this pull request Jun 22, 2018
PKRoma pushed a commit to PKRoma/git-for-windows that referenced this pull request Jun 22, 2018
dscho added a commit that referenced this pull request Aug 22, 2018
dscho added a commit to dscho/git that referenced this pull request Aug 22, 2018
dscho added a commit that referenced this pull request Aug 23, 2018
dscho added a commit that referenced this pull request Aug 23, 2018
dscho added a commit that referenced this pull request Aug 23, 2018
jamill pushed a commit to jamill/git that referenced this pull request Aug 28, 2018
jamill pushed a commit to jamill/git that referenced this pull request Sep 5, 2018
git-for-windows-ci pushed a commit that referenced this pull request Sep 10, 2018
jamill pushed a commit to jamill/git that referenced this pull request Sep 11, 2018
git-for-windows-ci pushed a commit that referenced this pull request Sep 24, 2018
dscho added a commit that referenced this pull request Oct 10, 2018
dscho added a commit to dscho/git that referenced this pull request Oct 12, 2018
dscho added a commit that referenced this pull request Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants