From 1385b4b1138eeebd79b6dab940915b509a82cb5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Thu, 12 Jul 2018 14:27:04 +0200 Subject: Protobuf: restore 'PROTOBUF_IMPORT_DIRS' check This was not present in the upstream code. --- Modules/FindProtobuf.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 720e553..fdd7d48 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -245,6 +245,10 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) set(_append_arg APPEND_PATH) endif() + if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS) + set(Protobuf_IMPORT_DIRS "${PROTOBUF_IMPORT_DIRS}") + endif() + if(DEFINED Protobuf_IMPORT_DIRS) set(_import_arg IMPORT_DIRS ${Protobuf_IMPORT_DIRS}) endif() @@ -275,6 +279,10 @@ function(PROTOBUF_GENERATE_PYTHON SRCS) set(_append_arg APPEND_PATH) endif() + if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS) + set(Protobuf_IMPORT_DIRS "${PROTOBUF_IMPORT_DIRS}") + endif() + if(DEFINED Protobuf_IMPORT_DIRS) set(_import_arg IMPORT_DIRS ${Protobuf_IMPORT_DIRS}) endif() -- cgit v0.12