diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2017-11-30 17:45:11 +0100 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2017-12-01 10:07:43 +0100 |
commit | f0620a37a5b417c4a35f18652432bfe2d14eeb3e (patch) | |
tree | 17d2ad85fc10190c6bee4081813766fe7c46c186 | |
parent | b839d8c709250b348a446442edb87474737bea6a (diff) |
fix linux distrib tests
-rw-r--r-- | examples/cpp/helloworld/CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/cpp/helloworld/CMakeLists.txt b/examples/cpp/helloworld/CMakeLists.txt index a1869d21bb..49684a13b0 100644 --- a/examples/cpp/helloworld/CMakeLists.txt +++ b/examples/cpp/helloworld/CMakeLists.txt @@ -13,19 +13,20 @@ endif() # Protobuf
# NOTE: we cannot use "CONFIG" mode here because protobuf-config.cmake
# is broken when used with CMAKE_INSTALL_PREFIX
-find_package(protobuf REQUIRED)
+find_package(Protobuf REQUIRED)
message(STATUS "Using protobuf ${protobuf_VERSION}")
if(Protobuf_FOUND)
# Protobuf_FOUND is set for package type "CONFIG"
set(_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf)
set(_PROTOBUF_PROTOC protobuf::protoc)
-endif()
-if(PROTOBUF_FOUND)
+elseif(PROTOBUF_FOUND)
# PROTOBUF_FOUND is set for package type "MODULE"
set(_PROTOBUF_LIBPROTOBUF ${PROTOBUF_LIBRARIES})
set(_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE})
include_directories(${PROTOBUF_INCLUDE_DIRS})
+else()
+ message(WARNING "Failed to locate libprotobuf and protoc!")
endif()
# gRPC
|