aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/CMakeLists.txt.template
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-12-14 02:42:34 +0100
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-12-14 03:53:15 +0100
commit86ef92516a911536f955b8f76cf656bfd8174670 (patch)
tree8fe8674826fcc60662db1bcf66b5af397811509e /templates/CMakeLists.txt.template
parentb2c389352fa0dc6f0636e2806d525174315128af (diff)
dont hardcode using boringssl headers when ssl provider is package
Diffstat (limited to 'templates/CMakeLists.txt.template')
-rw-r--r--templates/CMakeLists.txt.template7
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index 5ce38b557f..5ef34e47ad 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -269,6 +269,7 @@
add_subdirectory(<%text>${BORINGSSL_ROOT_DIR}</%text> third_party/boringssl)
if(TARGET ssl)
set(_gRPC_SSL_LIBRARIES ssl)
+ set(_gRPC_SSL_INCLUDE_DIR <%text>${BORINGSSL_ROOT_DIR}</%text>/include)
endif()
else()
message(WARNING "gRPC_SSL_PROVIDER is \"module\" but BORINGSSL_ROOT_DIR is wrong")
@@ -280,7 +281,7 @@
elseif("<%text>${gRPC_SSL_PROVIDER}</%text>" STREQUAL "package")
find_package(OpenSSL REQUIRED)
set(_gRPC_SSL_LIBRARIES <%text>${OPENSSL_LIBRARIES}</%text>)
- include_directories(<%text>${OPENSSL_INCLUDE_DIR}</%text>)
+ set(_gRPC_SSL_INCLUDE_DIR <%text>${OPENSSL_INCLUDE_DIR}</%text>)
set(_gRPC_FIND_SSL "if(NOT OPENSSL_FOUND)\n find_package(OpenSSL)\nendif()")
endif()
@@ -515,7 +516,7 @@
target_include_directories(${lib.name}
PUBLIC <%text>$<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include></%text>
PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>
- PRIVATE <%text>${BORINGSSL_ROOT_DIR}</%text>/include
+ PRIVATE <%text>${_gRPC_SSL_INCLUDE_DIR}</%text>
PRIVATE <%text>${PROTOBUF_ROOT_DIR}</%text>/src
PRIVATE <%text>${ZLIB_INCLUDE_DIR}</%text>
PRIVATE <%text>${BENCHMARK}</%text>/include
@@ -586,7 +587,7 @@
target_include_directories(${tgt.name}
PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>
PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/include
- PRIVATE <%text>${BORINGSSL_ROOT_DIR}</%text>/include
+ PRIVATE <%text>${_gRPC_SSL_INCLUDE_DIR}</%text>
PRIVATE <%text>${PROTOBUF_ROOT_DIR}</%text>/src
PRIVATE <%text>${BENCHMARK_ROOT_DIR}</%text>/include
PRIVATE <%text>${ZLIB_ROOT_DIR}</%text>