diff options
author | Brad King <brad.king@kitware.com> | 2016-08-03 13:20:50 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-08-03 13:20:50 (GMT) |
commit | a85e2a89de3d394d084703b29cd7e0ef3bf8f570 (patch) | |
tree | cbac5b90eea8aab34fb4925aa397b01e658fef64 /Modules | |
parent | ec807f6edf7ddd49fc82638f176ac58d6eab6b80 (diff) | |
parent | 5790d9b6f5ae0b5bb8b0f2e4ec630a690b4b0301 (diff) | |
download | CMake-a85e2a89de3d394d084703b29cd7e0ef3bf8f570.zip CMake-a85e2a89de3d394d084703b29cd7e0ef3bf8f570.tar.gz CMake-a85e2a89de3d394d084703b29cd7e0ef3bf8f570.tar.bz2 |
Merge topic 'FindProtobuf-restore-PROTOBUF_IMPORT_DIRS'
5790d9b6 FindProtobuf: Restore support for PROTOBUF_IMPORT_DIRS
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindProtobuf.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index c90a0a2..8a2e4e7 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) @@ -187,6 +191,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) |