Skip to content

Commit

Permalink
socktap: use config shipped with Protobuf for Cube EVK
Browse files Browse the repository at this point in the history
The package module shipped with CMake fails with recent Protobuf
versions depending on abseil explicitly.
  • Loading branch information
riebl committed Jan 15, 2024
1 parent 5a04054 commit 09101f1
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tools/socktap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,13 @@ add_executable(socktap
# cube evk board from nfiniity
option(SOCKTAP_WITH_CUBE_EVK "Use cube evk for socktap" OFF)
if (SOCKTAP_WITH_CUBE_EVK)
find_package(Protobuf REQUIRED)
find_package(Protobuf REQUIRED CONFIG)
protobuf_generate(TARGET socktap PROTOS nfiniity_cube_radio.proto)
target_compile_definitions(socktap PUBLIC "SOCKTAP_WITH_CUBE_EVK")

protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS nfiniity_cube_radio.proto)
add_library(socktap_cube_radio_protobuf_lib INTERFACE)
target_sources(socktap_cube_radio_protobuf_lib INTERFACE ${PROTO_SRCS} ${PROTO_HDRS})
target_link_libraries(socktap_cube_radio_protobuf_lib INTERFACE ${PROTOBUF_LIBRARIES})
target_include_directories(socktap_cube_radio_protobuf_lib INTERFACE ${PROTOBUF_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})

target_link_libraries(socktap PUBLIC socktap_cube_radio_protobuf_lib)
target_sources(socktap PRIVATE nfiniity_cube_evk_link.cpp nfiniity_cube_evk.cpp)
target_include_directories(socktap PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(socktap PUBLIC protobuf::libprotobuf)
set_property(TARGET socktap PROPERTY CXX_STANDARD 17)
endif()

option(SOCKTAP_WITH_AUTOTALKS "Use Autotalks API for socktap" OFF) # Both Secton and Craton devices
Expand Down

0 comments on commit 09101f1

Please sign in to comment.