From 8c5557af6ff55b0dd806aa5205be7a11e92db990 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 13 Sep 2017 18:07:24 +0200 Subject: build: Clean up output with missing ProtobufC --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 642c391c..624950bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,12 @@ endif () enable_testing() add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) -find_package(ProtobufC REQUIRED QUIET) +find_package(ProtobufC QUIET) +if (NOT (PROTOBUF_C_INCLUDE_DIRS AND PROTOBUF_C_LIBRARY + AND PROTOBUF_PROTOC_C_EXECUTABLE)) + message(FATAL_ERROR "Protobuf C compiler required but not found. " + "Please install Google Protocol Buffers.") +endif () include_directories(${PROTOBUF_C_INCLUDE_DIRS}) add_subdirectory(include) -- cgit v1.2.3