feat: update protos to 2020-02-25 version (#37)

Update the dependencies based on the new protos.
This commit is contained in:
Carlos O'Ryan 2020-02-25 13:20:33 -05:00 committed by GitHub
parent 3e4f8c025e
commit c1713cb00d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 306 additions and 365 deletions

View file

@ -107,35 +107,35 @@ else ()
if (NOT TARGET protobuf::libprotobuf)
add_library(protobuf::libprotobuf IMPORTED INTERFACE)
set_property(TARGET protobuf::libprotobuf
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${Protobuf_INCLUDE_DIR})
set_property(TARGET protobuf::libprotobuf
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${Protobuf_LIBRARY}
Threads::Threads)
set_property(
TARGET protobuf::libprotobuf
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Protobuf_INCLUDE_DIR})
set_property(
TARGET protobuf::libprotobuf APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${Protobuf_LIBRARY}
Threads::Threads)
endif ()
if (NOT TARGET protobuf::libprotobuf-lite)
add_library(protobuf::libprotobuf-lite IMPORTED INTERFACE)
set_property(TARGET protobuf::libprotobuf-lite
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${Protobuf_INCLUDE_DIR})
set_property(TARGET protobuf::libprotobuf-lite
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES
${Protobuf_LITE_LIBRARY} Threads::Threads)
set_property(
TARGET protobuf::libprotobuf-lite
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Protobuf_INCLUDE_DIR})
set_property(
TARGET protobuf::libprotobuf-lite APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${Protobuf_LITE_LIBRARY}
Threads::Threads)
endif ()
if (NOT TARGET protobuf::libprotoc)
add_library(protobuf::libprotoc IMPORTED INTERFACE)
set_property(TARGET protobuf::libprotoc
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${Protobuf_INCLUDE_DIR})
set_property(TARGET protobuf::libprotoc
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES
${Protobuf_PROTOC_LIBRARY} Threads::Threads)
set_property(
TARGET protobuf::libprotoc
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Protobuf_INCLUDE_DIR})
set_property(
TARGET protobuf::libprotoc APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${Protobuf_PROTOC_LIBRARY}
Threads::Threads)
endif ()
endif ()
endif ()
@ -152,9 +152,10 @@ if (ProtobufTargets_FOUND AND NOT TARGET protobuf::protoc)
add_executable(protobuf::protoc IMPORTED)
# Discover the protoc compiler location.
find_program(_protobuf_PROTOC_EXECUTABLE
NAMES protoc
DOC "The Google Protocol Buffers Compiler")
find_program(
_protobuf_PROTOC_EXECUTABLE
NAMES protoc
DOC "The Google Protocol Buffers Compiler")
if (protobuf_DEBUG)
message(
STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
@ -165,11 +166,11 @@ if (ProtobufTargets_FOUND AND NOT TARGET protobuf::protoc)
set_property(TARGET protobuf::protoc
PROPERTY IMPORTED_LOCATION ${_protobuf_PROTOC_EXECUTABLE})
set_property(
TARGET protobuf::protoc
PROPERTY IMPORTED_LOCATION_DEBUG ${_protobuf_PROTOC_EXECUTABLE})
set_property(TARGET protobuf::protoc
PROPERTY IMPORTED_LOCATION_RELEASE
${_protobuf_PROTOC_EXECUTABLE})
TARGET protobuf::protoc PROPERTY IMPORTED_LOCATION_DEBUG
${_protobuf_PROTOC_EXECUTABLE})
set_property(
TARGET protobuf::protoc PROPERTY IMPORTED_LOCATION_RELEASE
${_protobuf_PROTOC_EXECUTABLE})
unset(_protobuf_PROTOC_EXECUTABLE)
if (protobuf_DEBUG)
@ -186,10 +187,8 @@ if (protobuf_DEBUG)
"ProtobufTargets_FOUND = ${ProtobufTargets_FOUND}"
" ProtobufTargets_VERSION = ${ProtobufTargets_VERSION}")
if (ProtobufTargets_FOUND)
foreach (_target
protobuf::libprotobuf
protobuf::libprotobuf-lite
protobuf::libprotoc)
foreach (_target protobuf::libprotobuf protobuf::libprotobuf-lite
protobuf::libprotoc)
if (NOT TARGET ${_target})
message(
STATUS
@ -201,7 +200,5 @@ if (protobuf_DEBUG)
endif ()
endif ()
find_package_handle_standard_args(ProtobufTargets
REQUIRED_VARS
ProtobufTargets_FOUND
ProtobufTargets_VERSION)
find_package_handle_standard_args(ProtobufTargets REQUIRED_VARS
ProtobufTargets_FOUND ProtobufTargets_VERSION)