From 6f155f1878d187adba62b8555841e5c9a1901099 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 17 Nov 2014 10:20:45 +0100 Subject: [PATCH] add better check if protobuf is found --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d72341792e..1b7ad2d0452 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,10 @@ include(CheckCXXCompilerFlag) include(FindPackageHandleStandardArgs) find_package(Protobuf REQUIRED) +if(PROTOBUF_PROTOC_EXECUTABLE STREQUAL "PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND") + message(SEND_ERROR "protoc executable not found! Missing protobuf-compiler package?") +endif() + include_directories(${PROTOBUF_INCLUDE_DIRS}) file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/Descriptors/*.proto") PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles})