|
|
|
@ -65,12 +65,11 @@ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package") |
|
|
|
|
endif() |
|
|
|
|
if(TARGET protobuf::libprotoc) |
|
|
|
|
set(_gRPC_PROTOBUF_PROTOC_LIBRARIES protobuf::libprotoc) |
|
|
|
|
# extract the include dir from target's properties |
|
|
|
|
get_target_property(_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR protobuf::libprotoc INTERFACE_INCLUDE_DIRECTORIES) |
|
|
|
|
else() |
|
|
|
|
set(_gRPC_PROTOBUF_PROTOC_LIBRARIES ${PROTOBUF_PROTOC_LIBRARIES}) |
|
|
|
|
set(_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIRS}) |
|
|
|
|
endif() |
|
|
|
|
# Well-known proto files are expected to be in the Protobuf include directory. |
|
|
|
|
get_target_property(_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR _gRPC_PROTOBUF_LIBRARIES INTERFACE_INCLUDE_DIRECTORIES) |
|
|
|
|
if(TARGET protobuf::protoc) |
|
|
|
|
set(_gRPC_PROTOBUF_PROTOC protobuf::protoc) |
|
|
|
|
if(CMAKE_CROSSCOMPILING) |
|
|
|
|