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

CMake: fix linking protobuf #4185

Merged
merged 1 commit into from
Aug 6, 2021
Merged

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Aug 6, 2021

@github-actions github-actions bot added the build label Aug 6, 2021
@Be-ing Be-ing requested a review from daschuer August 6, 2021 17:47
include(IsStaticLibrary)
if(TARGET protobuf::libprotobuf-lite)
target_link_libraries(mixxx-proto PRIVATE protobuf::libprotobuf-lite)
is_static_library(Protobuf_USE_STATIC_LIBS protobuf::libprotobuf-lite)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm doubt this is even needed. Protobuf_USE_STATIC_LIBS is a parameter for the Protobuf find module (https://cmake.org/cmake/help/latest/module/FindProtobuf.html) so I don't think it does anything after the find_package(Protobuf REQURIED).

Copy link
Member

Choose a reason for hiding this comment

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

Oh yes. So lets remove it entirely. Do we have still a use case for setting it from Mixxx? If so, we can reintroduce it.

@coveralls
Copy link

coveralls commented Aug 6, 2021

Pull Request Test Coverage Report for Build 1105940102

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 25.997%

Totals Coverage Status
Change from base Build 1104640684: 0.0%
Covered Lines: 20008
Relevant Lines: 76962

💛 - Coveralls

@daschuer
Copy link
Member

daschuer commented Aug 6, 2021

Nice solution, to be honest I have not understand how it has ever worked.
I think I have "fixed" the original state which actually brakes it.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

LGTM,
(this was the last questionable use of BUILD_SHARED_LIBS)

@daschuer daschuer merged commit 3f0ea48 into mixxxdj:main Aug 6, 2021
@Be-ing
Copy link
Contributor Author

Be-ing commented Aug 6, 2021

Yes, BUILD_SHARED_LIBS is for setting how to link libraries being built by CMake, not for specifying whether dependencies are shared or static.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants