Skip to content

Commit

Permalink
[build] cmake: add absl dependency for newer protobuf (#6609)
Browse files Browse the repository at this point in the history
Works around a bug on some systems where protobuf does not correctly depend on required absl libraries.
  • Loading branch information
mfisher31 authored May 15, 2024
1 parent 40b35f0 commit b0d3bf4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wpiutil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ endif()
wpilib_target_warnings(wpiutil)
target_link_libraries(wpiutil protobuf::libprotobuf Threads::Threads ${CMAKE_DL_LIBS})

if(Protobuf_VERSION VERSION_GREATER_EQUAL 4)
find_package(absl REQUIRED)
target_link_libraries(wpiutil absl::spinlock_wait)
endif()

if(ATOMIC)
target_link_libraries(wpiutil ${ATOMIC})
endif()
Expand Down

0 comments on commit b0d3bf4

Please sign in to comment.