Commit 6d2124a1 authored by Clément Péron's avatar Clément Péron

cmake: properly set PROTOBUF_INCLUDE_DIR in case we use Cmake config

Signed-off-by: default avatarClément Péron <peron.clem@gmail.com>
parent e0e9ee16
......@@ -23,6 +23,7 @@ find_package(Protobuf CONFIG)
if(Protobuf_FOUND)
# Keep compatibility with FindProtobuf CMake module
set(PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>)
get_target_property(PROTOBUF_INCLUDE_DIR protobuf::libprotobuf INCLUDE_DIRECTORIES)
else()
message(STATUS "Protobuf CMake config not found fallback to Cmake Module")
find_package(Protobuf REQUIRED)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment