Skip to content

Commit

Permalink
add better check if protobuf is found
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Nov 17, 2014
1 parent 3c958fe commit 6f155f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 6f155f1

Please sign in to comment.