summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-02 14:52:36 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-02 14:52:36 (GMT)
commit3c57905dcf9a458d403f25b451bab5f525c3ac61 (patch)
treed9ee49505730e43274c39ab23112d90c62c48c14
parentf59513140bf086eda2029c5b4e950fc58216c06e (diff)
parent5790d9b6f5ae0b5bb8b0f2e4ec630a690b4b0301 (diff)
downloadCMake-3c57905dcf9a458d403f25b451bab5f525c3ac61.zip
CMake-3c57905dcf9a458d403f25b451bab5f525c3ac61.tar.gz
CMake-3c57905dcf9a458d403f25b451bab5f525c3ac61.tar.bz2
Merge branch 'FindProtobuf-restore-PROTOBUF_IMPORT_DIRS' into release
-rw-r--r--Modules/FindProtobuf.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index 8042073..2807bb9 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -129,6 +129,10 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS)
set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
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)
foreach(DIR ${Protobuf_IMPORT_DIRS})
get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
@@ -183,6 +187,10 @@ function(PROTOBUF_GENERATE_PYTHON SRCS)
set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
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)
foreach(DIR ${Protobuf_IMPORT_DIRS})
get_filename_component(ABS_PATH ${DIR} ABSOLUTE)