Skip to content

Commit

Permalink
Changing to any version of Protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
keenon committed Jan 12, 2025
1 parent 7f3ac81 commit 76582a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmake/DARTFindProtobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# All rights reserved.
#
# The list of contributors can be found at:
# https://github.com/dartsim/dart/blob/master/LICENSE
# https://github.com/dartsim/dart/blob/master/LICENSE
#
# This file is provided under the "BSD-style" License

find_package(Protobuf "3.14.0.0" EXACT REQUIRED)
# find_package(Protobuf "5.29.2" EXACT REQUIRED)
find_package(Protobuf REQUIRED)

message(STATUS "Protobuf_LIBRARIES: ${Protobuf_LIBRARIES}")

Expand All @@ -17,13 +18,15 @@ if(Protobuf_FOUND AND NOT TARGET protobuf::libprotobuf)
INTERFACE_LINK_LIBRARIES "${Protobuf_LIBRARIES}"
)
endif()

if(Protobuf_FOUND AND NOT TARGET protobuf::libprotoc)
add_library(protobuf::libprotoc INTERFACE IMPORTED)
set_target_properties(protobuf::libprotoc PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${Protobuf_PROTOC_LIBRARIES}"
)
endif()

if(Protobuf_FOUND AND NOT TARGET protobuf::libprotobuf-lite)
add_library(protobuf::libprotobuf-lite INTERFACE IMPORTED)
set_target_properties(protobuf::libprotobuf-lite PROPERTIES
Expand Down

0 comments on commit 76582a6

Please sign in to comment.