summaryrefslogtreecommitdiff
path: root/Modules/FindProtobuf.cmake
diff options
context:
space:
mode:
authorAndré Apitzsch <andre.apitzsch@etit.tu-chemnitz.de>2018-07-12 14:27:04 +0200
committerBrad King <brad.king@kitware.com>2018-07-16 08:59:21 -0400
commit1385b4b1138eeebd79b6dab940915b509a82cb5f (patch)
tree6d615ff602766ad512b1d6414ee290807bb3c270 /Modules/FindProtobuf.cmake
parent1bcc0f3678daea6bb7f999ebded1eab471b32e28 (diff)
downloadcmake-1385b4b1138eeebd79b6dab940915b509a82cb5f.tar.gz
Protobuf: restore 'PROTOBUF_IMPORT_DIRS' check
This was not present in the upstream code.
Diffstat (limited to 'Modules/FindProtobuf.cmake')
-rw-r--r--Modules/FindProtobuf.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index 720e5538d2..fdd7d48744 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()