diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-01-18 19:32:27 +0100 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-01-18 19:34:20 +0100 |
commit | fb227b0968e668cf9a3b7b6e1e2f5445f29eafb0 (patch) | |
tree | 292776fe2f6f2dcf0060c47cdc4c9d4923b3f6cb | |
parent | dec076c4abe7bd5518abab7a8da4e624c49ec655 (diff) |
improve comments on find_package(Protobuf)
-rw-r--r-- | cmake/protobuf.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake index fccabd455a..cb799b5295 100644 --- a/cmake/protobuf.cmake +++ b/cmake/protobuf.cmake @@ -53,6 +53,11 @@ if("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "module") endif() elseif("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "package") find_package(Protobuf REQUIRED ${gRPC_PROTOBUF_PACKAGE_TYPE}) + + # {Protobuf,PROTOBUF}_FOUND is defined based on find_package type ("MODULE" vs "CONFIG"). + # For "MODULE", the case has also changed between cmake 3.5 and 3.6. + # We use the legacy uppercase version for *_LIBRARIES AND *_INCLUDE_DIRS variables + # as newer cmake versions provide them too for backward compatibility. if(Protobuf_FOUND OR PROTOBUF_FOUND) if(TARGET protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME}) set(_gRPC_PROTOBUF_LIBRARIES protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME}) |