Skip to content

We've already added ZLIB_LIBRARIES to LIBGIT2_LIBS so don't also add the z library#5080

Merged
pks-t merged 4 commits into
libgit2:masterfrom
dbrnz:issue-5079
May 21, 2019
Merged

We've already added ZLIB_LIBRARIES to LIBGIT2_LIBS so don't also add the z library#5080
pks-t merged 4 commits into
libgit2:masterfrom
dbrnz:issue-5079

Conversation

@dbrnz

@dbrnz dbrnz commented May 21, 2019

Copy link
Copy Markdown
Contributor

This resolves issue #5079.

@pks-t pks-t left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! We definitely do this wrong right now, but removing this whole block altogether is wrong, too.

Comment thread src/CMakeLists.txt
LIST(APPEND LIBGIT2_LIBS ${ZLIB_LIBRARIES})
IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
LIST(APPEND LIBGIT2_LIBS "z")
LIST(APPEND LIBGIT2_PC_LIBS "-lz")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the first line is definitely bogus, we don't want to append twice to LIBGIT2_LIBS. But appending to LIBGIT2_PC_LIBS is in fact required. Doing so will not cause us to link twice, but the PC_LIBS variable will cause us to append this lib to the generated pkgconfig file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree -- updates committed.

Comment thread src/CMakeLists.txt Outdated
LIST(APPEND LIBGIT2_PC_LIBS "-lz")
ELSE()
LIST(APPEND LIBGIT2_PC_REQUIRES "zlib")
ENDIF()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to be a nag, but there's some leading spaces now in front of the tabs. If you convert that to all-tabs then we're ready to go!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs versus spaces can be a pain! Hopefully all is now good.

@pks-t pks-t left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly looks good to me now! Thanks a lot for fixing this.

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.

2 participants