Skip to content

Commit

Permalink
[build] cmake: add absl dependency for newer protobuf (wpilibsuite#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 and chauser committed May 30, 2024
1 parent 314b712 commit eed48b3
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 eed48b3

Please sign in to comment.