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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions src/proto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

find_package(Protobuf REQUIRED)

protobuf_generate_cpp(TCP_CPP TCP_HPP "MumbleTCP.proto")
protobuf_generate_cpp(UDP_CPP UDP_HPP "MumbleUDP.proto")

add_library(Proto OBJECT)

target_disable_warnings(Proto)
Expand All @@ -19,17 +16,14 @@ target_include_directories(Proto

set_target_properties(Proto PROPERTIES UNITY_BUILD OFF)

target_sources(Proto
PRIVATE
${TCP_CPP}
${UDP_CPP}
# Marking the headers as PUBLIC causes CMake's configure step to fail.
# The files are generated during the build step.
${TCP_HPP}
${UDP_HPP}
)

target_link_libraries(Proto
PRIVATE
protobuf::libprotobuf
)

protobuf_generate(
TARGET Proto
PROTOS
"MumbleTCP.proto"
"MumbleUDP.proto"
)
Loading