diff options
author | yang-g <yangg@google.com> | 2017-04-12 10:18:10 -0700 |
---|---|---|
committer | yang-g <yangg@google.com> | 2017-04-12 10:18:10 -0700 |
commit | 66d40c63f7bf004623dcc4dbafda96b69fc46094 (patch) | |
tree | 538cddb8b9826207ed956e4ace5923a54a34ea2d /templates | |
parent | eceec8eaf6f38766364b203e92ccb6b25028b89b (diff) |
Fix BUILD dependency, copyright and cmake
Diffstat (limited to 'templates')
-rw-r--r-- | templates/CMakeLists.txt.template | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index cf69f0cc06..c647ea5707 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -212,6 +212,7 @@ if(NOT PROTOBUF_ROOT_DIR) set(PROTOBUF_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/protobuf) endif() + set(PROTOBUF_WELLKNOWN_IMPORT_DIR <%text>${PROTOBUF_ROOT_DIR}</%text>/src) if(EXISTS "<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake/CMakeLists.txt") set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries") add_subdirectory(<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake third_party/protobuf) @@ -244,6 +245,7 @@ find_package(Protobuf MODULE) set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND)\n find_package(Protobuf)\nendif()") endif() + set(PROTOBUF_WELLKNOWN_IMPORT_DIR /usr/local/include) endif() if("<%text>${gRPC_SSL_PROVIDER}</%text>" STREQUAL "module") @@ -346,7 +348,7 @@ return() endif() - set(_protobuf_include_path -I .) + set(_protobuf_include_path -I . -I <%text>${PROTOBUF_WELLKNOWN_IMPORT_DIR}</%text>) foreach(FIL <%text>${ARGN}</%text>) get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE) get_filename_component(FIL_WE <%text>${FIL}</%text> NAME_WE) |