Skip to content

Commit

Permalink
[build] Fix cmake build with WITH_PROTOBUF off (#7368)
Browse files Browse the repository at this point in the history
Protobuf.cpp only uses nanopb, which is fine to have even with WITH_PROTOBUF off.
  • Loading branch information
ThadHouse authored Nov 8, 2024
1 parent 661bae5 commit d39dfd6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wpiutil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ file(
list(REMOVE_ITEM wpiutil_native_src ${wpiutil_jni_src})
if(NOT WITH_PROTOBUF)
list(FILTER wpiutil_native_src EXCLUDE REGEX "/protobuf/")
# Don't filter out protobuf cpp file, it only uses nanopb
list(APPEND wpiutil_native_src src/main/native/cpp/protobuf/Protobuf.cpp)
endif()
file(GLOB_RECURSE wpiutil_unix_src src/main/native/unix/*.cpp)
file(GLOB_RECURSE wpiutil_linux_src src/main/native/linux/*.cpp)
Expand Down

0 comments on commit d39dfd6

Please sign in to comment.