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: Replace deprecated protobuf_generate_cpp() #19

Merged
merged 1 commit into from
Mar 3, 2024
Merged

CMake: Replace deprecated protobuf_generate_cpp() #19

merged 1 commit into from
Mar 3, 2024

Conversation

Nordup
Copy link
Contributor

@Nordup Nordup commented Jan 4, 2024

I was getting an error when building (manjaro with cmake 3.28.1):
Unknown CMake command "protobuf_generate_cpp"

Found a solution here: https://stackoverflow.com/a/56896032/13580789

Udp: switched to protobuf_generate() as discussed

@Krzmbrzl
Copy link
Member

Krzmbrzl commented Jan 4, 2024

Relevant: https://gitlab.kitware.com/cmake/cmake/-/issues/21228

It seems like there should be a "cleaner" way of solving this but this probably involves digging around Protobuf and cmake sources and checking whether the respective behaviors are version-dependent. So I guess this simple fix will do.

@davidebeatrici opinion?

@davidebeatrici
Copy link
Member

We should switch to protobuf_generate(): https://cmake.org/cmake/help/latest/module/FindProtobuf.html#command:protobuf_generate

@Krzmbrzl
Copy link
Member

Krzmbrzl commented Jan 5, 2024

@Nordup
Copy link
Contributor Author

Nordup commented Jan 5, 2024

I'm closing this PR then?

@davidebeatrici
Copy link
Member

Well, it works as a workaround but it would be great to switch directly to the new function.

@Nordup Nordup changed the title Fix cmake build: set protobuf_MODULE_COMPATIBLE ON Fix cmake build: use protobuf_generate Jan 25, 2024
@Nordup
Copy link
Contributor Author

Nordup commented Jan 25, 2024

Will this do? :)

@Nordup
Copy link
Contributor Author

Nordup commented Jan 27, 2024

Why downloading on windows is failing((
error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404

@davidebeatrici
Copy link
Member

Sorry for the delay, see microsoft/vcpkg#36502.

We can ignore the failure for the time being, as I can test the PR on Windows myself.

@davidebeatrici
Copy link
Member

Fixed in #22.

@davidebeatrici davidebeatrici changed the title Fix cmake build: use protobuf_generate CMake: Replace deprecated protobuf_generate_cpp() Mar 3, 2024
@davidebeatrici davidebeatrici merged commit 0031b81 into mumble-voip:master Mar 3, 2024
6 checks passed
@davidebeatrici
Copy link
Member

Thank you very much for your contribution!

@Nordup
Copy link
Contributor Author

Nordup commented Mar 3, 2024

It’s a pleasure 😇

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.

3 participants