mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-06-01 22:16:27 +02:00
Added logic to catch cases when we found Protobuf but did not find protoc
This commit is contained in:
parent
a187e201e8
commit
d2eca389ed
|
@ -538,10 +538,16 @@ if (ENABLE_GOBGP_SUPPORT)
|
|||
if (Protobuf_FOUND)
|
||||
message(STATUS "Found Protobuf ${Protobuf_VERSION}")
|
||||
|
||||
# Empty checks are very tricky in cmake:
|
||||
# https://cmake.org/pipermail/cmake/2011-October/046939.html
|
||||
if ("${Protobuf_PROTOC_EXECUTABLE}" STREQUAL "")
|
||||
message(FATAL_ERROR "Protobuf was found but we did not find protoc")
|
||||
endif()
|
||||
|
||||
# Assign path to protoc
|
||||
set(PROTOC_BINARY ${Protobuf_PROTOC_EXECUTABLE})
|
||||
|
||||
message(STATUS "Found Protobuf compiler: ${Protobuf_PROTOC_EXECUTABLE}")
|
||||
message(STATUS "Found Protobuf compiler: '${Protobuf_PROTOC_EXECUTABLE}'")
|
||||
|
||||
# We need to explicitly provide paths for our dependency libraries in environment variable LD_LIBRARY_PATH as we use non system path for them
|
||||
# CentOS uses lib64 but Debian / Ubuntu still use lib for Protobuf, that's why we keep both of them
|
||||
|
|
Loading…
Reference in New Issue