blob: 707efd78115c4f0ca23f5c164875b1f30c951c05 [file] [log] [blame]
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001# GRPC global cmake file
2# This currently builds C and C++ code.
3# This file has been automatically generated from a template file.
4# Please look at the templates directory instead.
5# This file can be regenerated from the template by running
6# tools/buildgen/generate_projects.sh
Nicolas "Pixel" Nobleb360c8a2016-07-02 00:54:28 +02007#
8# Additionally, this is currently very experimental, and unsupported.
9# Further work will happen on that file.
10#
Tamas Berghammerd798a7d2016-06-21 13:58:18 +010011# Copyright 2015, Google Inc.
12# All rights reserved.
13#
14# Redistribution and use in source and binary forms, with or without
15# modification, are permitted provided that the following conditions are
16# met:
17#
18# * Redistributions of source code must retain the above copyright
19# notice, this list of conditions and the following disclaimer.
20# * Redistributions in binary form must reproduce the above
21# copyright notice, this list of conditions and the following disclaimer
22# in the documentation and/or other materials provided with the
23# distribution.
24# * Neither the name of Google Inc. nor the names of its
25# contributors may be used to endorse or promote products derived from
26# this software without specific prior written permission.
27#
28# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
40
41
42cmake_minimum_required(VERSION 2.8)
43
Tamas Berghammerdf6a44c2016-06-22 13:38:55 +010044set(PACKAGE_NAME "grpc")
Nicolas "Pixel" Noble49bfb922016-07-12 09:31:41 +020045set(PACKAGE_VERSION "1.1.0-dev")
Tamas Berghammerdf6a44c2016-06-22 13:38:55 +010046set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
47set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
48set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
49project(${PACKAGE_NAME} C CXX)
50
Arkadiy Shapkin40beb372016-08-17 14:42:36 +030051if (NOT MSVC)
52 set(gRPC_INSTALL ON CACHE BOOL "Generate installation target")
53else()
54 set(gRPC_INSTALL OFF CACHE BOOL "Generate installation target")
55endif()
56
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +030057set(gRPC_ZLIB_PROVIDER "module" CACHE STRING "Provider of zlib library")
58set_property(CACHE gRPC_ZLIB_PROVIDER PROPERTY STRINGS "module" "package")
Tamas Berghammerd798a7d2016-06-21 13:58:18 +010059
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +030060set(gRPC_SSL_PROVIDER "module" CACHE STRING "Provider of ssl library")
61set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
Tamas Berghammera72712e2016-07-06 10:30:25 +010062
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +030063set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library")
64set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package")
Tamas Berghammerd798a7d2016-06-21 13:58:18 +010065
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +030066set(gRPC_USE_PROTO_LITE OFF CACHE BOOL "Use the protobuf-lite library")
Tamas Berghammerd798a7d2016-06-21 13:58:18 +010067
Arkadiy Shapkin40beb372016-08-17 14:42:36 +030068if (MSVC)
69 add_definitions( -D_WIN32_WINNT=0x600 )
70endif()
71
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +030072if (gRPC_USE_PROTO_LITE)
73 set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf-lite")
Tamas Berghammer23911562016-07-27 15:24:05 +010074 add_definitions("-DGRPC_USE_PROTO_LITE")
75else()
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +030076 set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf")
Tamas Berghammerd798a7d2016-06-21 13:58:18 +010077endif()
78
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +030079if("${gRPC_ZLIB_PROVIDER}" STREQUAL "module")
80 if(NOT ZLIB_ROOT_DIR)
81 set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib)
82 endif()
83 set(ZLIB_INCLUDE_DIR "${ZLIB_ROOT_DIR}")
84 if(EXISTS "${ZLIB_ROOT_DIR}/CMakeLists.txt")
85 add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib)
86 if(TARGET zlibstatic)
87 set(_gRPC_ZLIB_LIBRARIES zlibstatic)
88 endif()
89 else()
90 message(WARNING "gRPC_ZLIB_PROVIDER is \"module\" but ZLIB_ROOT_DIR is wrong")
91 endif()
92elseif("${gRPC_ZLIB_PROVIDER}" STREQUAL "package")
93 find_package(ZLIB)
94 if(TARGET ZLIB::ZLIB)
95 set(_gRPC_ZLIB_LIBRARIES ZLIB::ZLIB)
96 endif()
Konstantin Podsvirovdd331482016-07-28 00:00:25 +030097 set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
Tamas Berghammerd798a7d2016-06-21 13:58:18 +010098endif()
99
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300100if("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "module")
101 # Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
102 # Disable them unless they are explicitly requested from the cmake command line (when we assume
103 # gmock is downloaded to the right location inside protobuf).
104 if(NOT protobuf_BUILD_TESTS)
105 set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
106 endif()
107 if(NOT PROTOBUF_ROOT_DIR)
108 set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf)
109 endif()
110 if(EXISTS "${PROTOBUF_ROOT_DIR}/cmake/CMakeLists.txt")
Arkadiy Shapkin40beb372016-08-17 14:42:36 +0300111 set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries")
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300112 add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf)
113 if(TARGET ${_gRPC_PROTOBUF_LIBRARY_NAME})
114 set(_gRPC_PROTOBUF_LIBRARIES ${_gRPC_PROTOBUF_LIBRARY_NAME})
115 endif()
116 if(TARGET libprotoc)
117 set(_gRPC_PROTOBUF_PROTOC_LIBRARIES libprotoc)
118 endif()
119 else()
120 message(WARNING "gRPC_PROTOBUF_PROVIDER is \"module\" but PROTOBUF_ROOT_DIR is wrong")
121 endif()
122elseif("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "package")
123 find_package(protobuf CONFIG)
124 if(protobuf_FOUND)
125 if(TARGET protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
126 set(_gRPC_PROTOBUF_LIBRARIES protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
127 endif()
128 if(TARGET protobuf::libprotoc)
129 set(_gRPC_PROTOBUF_PROTOC_LIBRARIES protobuf::libprotoc)
130 endif()
Konstantin Podsvirovdd331482016-07-28 00:00:25 +0300131 set(_gRPC_FIND_PROTOBUF "if(NOT protobuf_FOUND)\n find_package(protobuf CONFIG)\nendif()")
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300132 else()
133 find_package(Protobuf MODULE)
Konstantin Podsvirovdd331482016-07-28 00:00:25 +0300134 set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND)\n find_package(Protobuf)\nendif()")
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300135 endif()
136endif()
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100137
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300138if("${gRPC_SSL_PROVIDER}" STREQUAL "module")
139 if(NOT BORINGSSL_ROOT_DIR)
140 set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl)
141 endif()
142 if(EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt")
143 add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl)
144 if(TARGET ssl)
145 set(_gRPC_SSL_LIBRARIES ssl)
146 endif()
147 else()
148 message(WARNING "gRPC_SSL_PROVIDER is \"module\" but BORINGSSL_ROOT_DIR is wrong")
149 endif()
150elseif("${gRPC_SSL_PROVIDER}" STREQUAL "package")
151 find_package(OpenSSL)
152 if(TARGET OpenSSL::SSL)
153 set(_gRPC_SSL_LIBRARIES OpenSSL::SSL)
154 endif()
Konstantin Podsvirovdd331482016-07-28 00:00:25 +0300155 set(_gRPC_FIND_SSL "if(NOT OpenSSL_FOUND)\n find_package(OpenSSL)\nendif()")
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300156endif()
157
158if(NOT MSVC)
159 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
160 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
161endif()
162
163if(WIN32 AND MSVC)
164 set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32)
Tamas Berghammer23911562016-07-27 15:24:05 +0100165endif()
166
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300167include(GNUInstallDirs)
168if(NOT DEFINED CMAKE_INSTALL_CMAKEDIR)
169 set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/gRPC")
170endif()
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100171
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +0200172
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100173add_library(gpr
174 src/core/lib/profiling/basic_timers.c
175 src/core/lib/profiling/stap_timers.c
176 src/core/lib/support/alloc.c
177 src/core/lib/support/avl.c
178 src/core/lib/support/backoff.c
179 src/core/lib/support/cmdline.c
180 src/core/lib/support/cpu_iphone.c
181 src/core/lib/support/cpu_linux.c
182 src/core/lib/support/cpu_posix.c
183 src/core/lib/support/cpu_windows.c
184 src/core/lib/support/env_linux.c
185 src/core/lib/support/env_posix.c
186 src/core/lib/support/env_windows.c
187 src/core/lib/support/histogram.c
188 src/core/lib/support/host_port.c
189 src/core/lib/support/log.c
190 src/core/lib/support/log_android.c
191 src/core/lib/support/log_linux.c
192 src/core/lib/support/log_posix.c
193 src/core/lib/support/log_windows.c
Craig Tiller57726ca2016-09-12 11:59:45 -0700194 src/core/lib/support/mpscq.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100195 src/core/lib/support/murmur_hash.c
Craig Tiller17ed6b12016-08-18 09:33:33 -0700196 src/core/lib/support/percent_encoding.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100197 src/core/lib/support/slice.c
198 src/core/lib/support/slice_buffer.c
199 src/core/lib/support/stack_lockfree.c
200 src/core/lib/support/string.c
201 src/core/lib/support/string_posix.c
202 src/core/lib/support/string_util_windows.c
203 src/core/lib/support/string_windows.c
204 src/core/lib/support/subprocess_posix.c
205 src/core/lib/support/subprocess_windows.c
206 src/core/lib/support/sync.c
207 src/core/lib/support/sync_posix.c
208 src/core/lib/support/sync_windows.c
209 src/core/lib/support/thd.c
210 src/core/lib/support/thd_posix.c
211 src/core/lib/support/thd_windows.c
212 src/core/lib/support/time.c
213 src/core/lib/support/time_posix.c
214 src/core/lib/support/time_precise.c
215 src/core/lib/support/time_windows.c
216 src/core/lib/support/tls_pthread.c
217 src/core/lib/support/tmpfile_msys.c
218 src/core/lib/support/tmpfile_posix.c
219 src/core/lib/support/tmpfile_windows.c
220 src/core/lib/support/wrap_memcpy.c
221)
222
223target_include_directories(gpr
224 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
225 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
226 PRIVATE ${BORINGSSL_ROOT_DIR}/include
227 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300228 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100229 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
230)
231
232
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300233foreach(_hdr
234 include/grpc/support/alloc.h
235 include/grpc/support/atm.h
236 include/grpc/support/atm_gcc_atomic.h
237 include/grpc/support/atm_gcc_sync.h
238 include/grpc/support/atm_windows.h
239 include/grpc/support/avl.h
240 include/grpc/support/cmdline.h
241 include/grpc/support/cpu.h
242 include/grpc/support/histogram.h
243 include/grpc/support/host_port.h
244 include/grpc/support/log.h
245 include/grpc/support/log_windows.h
246 include/grpc/support/port_platform.h
247 include/grpc/support/slice.h
248 include/grpc/support/slice_buffer.h
249 include/grpc/support/string_util.h
250 include/grpc/support/subprocess.h
251 include/grpc/support/sync.h
252 include/grpc/support/sync_generic.h
253 include/grpc/support/sync_posix.h
254 include/grpc/support/sync_windows.h
255 include/grpc/support/thd.h
256 include/grpc/support/time.h
257 include/grpc/support/tls.h
258 include/grpc/support/tls_gcc.h
259 include/grpc/support/tls_msvc.h
260 include/grpc/support/tls_pthread.h
261 include/grpc/support/useful.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300262 include/grpc/impl/codegen/atm.h
263 include/grpc/impl/codegen/atm_gcc_atomic.h
264 include/grpc/impl/codegen/atm_gcc_sync.h
265 include/grpc/impl/codegen/atm_windows.h
David Garcia Quintas44cb6c92016-08-02 10:26:51 -0700266 include/grpc/impl/codegen/gpr_types.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300267 include/grpc/impl/codegen/port_platform.h
268 include/grpc/impl/codegen/slice.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300269 include/grpc/impl/codegen/sync.h
270 include/grpc/impl/codegen/sync_generic.h
271 include/grpc/impl/codegen/sync_posix.h
272 include/grpc/impl/codegen/sync_windows.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300273)
274 string(REPLACE "include/" "" _path ${_hdr})
275 get_filename_component(_path ${_path} PATH)
276 install(FILES ${_hdr}
277 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
278 )
279endforeach()
280
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +0200281
Arkadiy Shapkin40beb372016-08-17 14:42:36 +0300282if (gRPC_INSTALL)
283 install(TARGETS gpr EXPORT gRPCTargets
284 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
285 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
286 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
287 )
288endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300289
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +0200290
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100291add_library(grpc
292 src/core/lib/surface/init.c
293 src/core/lib/channel/channel_args.c
294 src/core/lib/channel/channel_stack.c
295 src/core/lib/channel/channel_stack_builder.c
296 src/core/lib/channel/compress_filter.c
297 src/core/lib/channel/connected_channel.c
Mark D. Roth14c072c2016-08-26 08:31:34 -0700298 src/core/lib/channel/deadline_filter.c
Mark D. Rothdfbdefe2016-07-14 09:18:22 -0700299 src/core/lib/channel/handshaker.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100300 src/core/lib/channel/http_client_filter.c
301 src/core/lib/channel/http_server_filter.c
Mark D. Rothaf00d8b2016-08-23 12:48:16 -0700302 src/core/lib/channel/message_size_filter.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100303 src/core/lib/compression/compression.c
304 src/core/lib/compression/message_compress.c
305 src/core/lib/debug/trace.c
306 src/core/lib/http/format_request.c
307 src/core/lib/http/httpcli.c
308 src/core/lib/http/parser.c
309 src/core/lib/iomgr/closure.c
Craig Tiller57726ca2016-09-12 11:59:45 -0700310 src/core/lib/iomgr/combiner.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100311 src/core/lib/iomgr/endpoint.c
312 src/core/lib/iomgr/endpoint_pair_posix.c
murgatroid99c36f6ea2016-10-03 09:24:09 -0700313 src/core/lib/iomgr/endpoint_pair_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100314 src/core/lib/iomgr/endpoint_pair_windows.c
315 src/core/lib/iomgr/error.c
Nicolas "Pixel" Nobleb360c8a2016-07-02 00:54:28 +0200316 src/core/lib/iomgr/ev_epoll_linux.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100317 src/core/lib/iomgr/ev_poll_and_epoll_posix.c
318 src/core/lib/iomgr/ev_poll_posix.c
319 src/core/lib/iomgr/ev_posix.c
320 src/core/lib/iomgr/exec_ctx.c
321 src/core/lib/iomgr/executor.c
322 src/core/lib/iomgr/iocp_windows.c
323 src/core/lib/iomgr/iomgr.c
324 src/core/lib/iomgr/iomgr_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700325 src/core/lib/iomgr/iomgr_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100326 src/core/lib/iomgr/iomgr_windows.c
327 src/core/lib/iomgr/load_file.c
Nicolas "Pixel" Nobleb360c8a2016-07-02 00:54:28 +0200328 src/core/lib/iomgr/network_status_tracker.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100329 src/core/lib/iomgr/polling_entity.c
murgatroid999030c812016-09-16 13:25:08 -0700330 src/core/lib/iomgr/pollset_set_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100331 src/core/lib/iomgr/pollset_set_windows.c
murgatroid999030c812016-09-16 13:25:08 -0700332 src/core/lib/iomgr/pollset_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100333 src/core/lib/iomgr/pollset_windows.c
334 src/core/lib/iomgr/resolve_address_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700335 src/core/lib/iomgr/resolve_address_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100336 src/core/lib/iomgr/resolve_address_windows.c
337 src/core/lib/iomgr/sockaddr_utils.c
338 src/core/lib/iomgr/socket_utils_common_posix.c
339 src/core/lib/iomgr/socket_utils_linux.c
340 src/core/lib/iomgr/socket_utils_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700341 src/core/lib/iomgr/socket_utils_uv.c
murgatroid9979b32272016-08-08 13:38:30 -0700342 src/core/lib/iomgr/socket_utils_windows.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100343 src/core/lib/iomgr/socket_windows.c
344 src/core/lib/iomgr/tcp_client_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700345 src/core/lib/iomgr/tcp_client_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100346 src/core/lib/iomgr/tcp_client_windows.c
347 src/core/lib/iomgr/tcp_posix.c
348 src/core/lib/iomgr/tcp_server_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700349 src/core/lib/iomgr/tcp_server_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100350 src/core/lib/iomgr/tcp_server_windows.c
murgatroid999030c812016-09-16 13:25:08 -0700351 src/core/lib/iomgr/tcp_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100352 src/core/lib/iomgr/tcp_windows.c
353 src/core/lib/iomgr/time_averaged_stats.c
murgatroid999030c812016-09-16 13:25:08 -0700354 src/core/lib/iomgr/timer_generic.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100355 src/core/lib/iomgr/timer_heap.c
murgatroid999030c812016-09-16 13:25:08 -0700356 src/core/lib/iomgr/timer_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100357 src/core/lib/iomgr/udp_server.c
358 src/core/lib/iomgr/unix_sockets_posix.c
359 src/core/lib/iomgr/unix_sockets_posix_noop.c
kpayson64d195cf52016-10-09 18:04:00 -0700360 src/core/lib/iomgr/wakeup_fd_cv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100361 src/core/lib/iomgr/wakeup_fd_eventfd.c
362 src/core/lib/iomgr/wakeup_fd_nospecial.c
363 src/core/lib/iomgr/wakeup_fd_pipe.c
364 src/core/lib/iomgr/wakeup_fd_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700365 src/core/lib/iomgr/workqueue_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100366 src/core/lib/iomgr/workqueue_windows.c
367 src/core/lib/json/json.c
368 src/core/lib/json/json_reader.c
369 src/core/lib/json/json_string.c
370 src/core/lib/json/json_writer.c
371 src/core/lib/surface/alarm.c
372 src/core/lib/surface/api_trace.c
373 src/core/lib/surface/byte_buffer.c
374 src/core/lib/surface/byte_buffer_reader.c
375 src/core/lib/surface/call.c
376 src/core/lib/surface/call_details.c
377 src/core/lib/surface/call_log_batch.c
378 src/core/lib/surface/channel.c
379 src/core/lib/surface/channel_init.c
380 src/core/lib/surface/channel_ping.c
381 src/core/lib/surface/channel_stack_type.c
382 src/core/lib/surface/completion_queue.c
383 src/core/lib/surface/event_string.c
384 src/core/lib/surface/lame_client.c
385 src/core/lib/surface/metadata_array.c
386 src/core/lib/surface/server.c
387 src/core/lib/surface/validate_metadata.c
388 src/core/lib/surface/version.c
389 src/core/lib/transport/byte_stream.c
390 src/core/lib/transport/connectivity_state.c
Mark D. Roth6a721b52016-10-14 12:43:34 -0700391 src/core/lib/transport/mdstr_hash_table.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100392 src/core/lib/transport/metadata.c
393 src/core/lib/transport/metadata_batch.c
Mark D. Rothbfe56802016-10-26 12:45:20 -0700394 src/core/lib/transport/method_config.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100395 src/core/lib/transport/static_metadata.c
Robbie Shade710d2422016-07-13 15:15:38 -0400396 src/core/lib/transport/timeout_encoding.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100397 src/core/lib/transport/transport.c
398 src/core/lib/transport/transport_op_string.c
399 src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
400 src/core/ext/transport/chttp2/transport/bin_decoder.c
401 src/core/ext/transport/chttp2/transport/bin_encoder.c
402 src/core/ext/transport/chttp2/transport/chttp2_plugin.c
403 src/core/ext/transport/chttp2/transport/chttp2_transport.c
404 src/core/ext/transport/chttp2/transport/frame_data.c
405 src/core/ext/transport/chttp2/transport/frame_goaway.c
406 src/core/ext/transport/chttp2/transport/frame_ping.c
407 src/core/ext/transport/chttp2/transport/frame_rst_stream.c
408 src/core/ext/transport/chttp2/transport/frame_settings.c
409 src/core/ext/transport/chttp2/transport/frame_window_update.c
410 src/core/ext/transport/chttp2/transport/hpack_encoder.c
411 src/core/ext/transport/chttp2/transport/hpack_parser.c
412 src/core/ext/transport/chttp2/transport/hpack_table.c
413 src/core/ext/transport/chttp2/transport/huffsyms.c
414 src/core/ext/transport/chttp2/transport/incoming_metadata.c
415 src/core/ext/transport/chttp2/transport/parsing.c
416 src/core/ext/transport/chttp2/transport/status_conversion.c
417 src/core/ext/transport/chttp2/transport/stream_lists.c
418 src/core/ext/transport/chttp2/transport/stream_map.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100419 src/core/ext/transport/chttp2/transport/varint.c
420 src/core/ext/transport/chttp2/transport/writing.c
421 src/core/ext/transport/chttp2/alpn/alpn.c
422 src/core/lib/http/httpcli_security_connector.c
423 src/core/lib/security/context/security_context.c
424 src/core/lib/security/credentials/composite/composite_credentials.c
425 src/core/lib/security/credentials/credentials.c
426 src/core/lib/security/credentials/credentials_metadata.c
427 src/core/lib/security/credentials/fake/fake_credentials.c
murgatroid997c205902016-08-09 10:07:42 -0700428 src/core/lib/security/credentials/google_default/credentials_generic.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100429 src/core/lib/security/credentials/google_default/google_default_credentials.c
430 src/core/lib/security/credentials/iam/iam_credentials.c
431 src/core/lib/security/credentials/jwt/json_token.c
432 src/core/lib/security/credentials/jwt/jwt_credentials.c
433 src/core/lib/security/credentials/jwt/jwt_verifier.c
434 src/core/lib/security/credentials/oauth2/oauth2_credentials.c
435 src/core/lib/security/credentials/plugin/plugin_credentials.c
436 src/core/lib/security/credentials/ssl/ssl_credentials.c
437 src/core/lib/security/transport/client_auth_filter.c
438 src/core/lib/security/transport/handshake.c
439 src/core/lib/security/transport/secure_endpoint.c
440 src/core/lib/security/transport/security_connector.c
441 src/core/lib/security/transport/server_auth_filter.c
442 src/core/lib/security/transport/tsi_error.c
443 src/core/lib/security/util/b64.c
444 src/core/lib/security/util/json_util.c
445 src/core/lib/surface/init_secure.c
446 src/core/lib/tsi/fake_transport_security.c
447 src/core/lib/tsi/ssl_transport_security.c
448 src/core/lib/tsi/transport_security.c
449 src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
Mark D. Roth2137cd82016-09-14 09:04:00 -0700450 src/core/ext/client_channel/channel_connectivity.c
451 src/core/ext/client_channel/client_channel.c
452 src/core/ext/client_channel/client_channel_factory.c
453 src/core/ext/client_channel/client_channel_plugin.c
454 src/core/ext/client_channel/connector.c
455 src/core/ext/client_channel/default_initial_connect_string.c
Mark D. Roth15195742016-10-07 09:02:28 -0700456 src/core/ext/client_channel/http_connect_handshaker.c
Mark D. Roth2137cd82016-09-14 09:04:00 -0700457 src/core/ext/client_channel/initial_connect_string.c
458 src/core/ext/client_channel/lb_policy.c
459 src/core/ext/client_channel/lb_policy_factory.c
460 src/core/ext/client_channel/lb_policy_registry.c
461 src/core/ext/client_channel/parse_address.c
462 src/core/ext/client_channel/resolver.c
463 src/core/ext/client_channel/resolver_factory.c
464 src/core/ext/client_channel/resolver_registry.c
465 src/core/ext/client_channel/resolver_result.c
466 src/core/ext/client_channel/subchannel.c
467 src/core/ext/client_channel/subchannel_index.c
468 src/core/ext/client_channel/uri_parser.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100469 src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
470 src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
471 src/core/ext/transport/chttp2/client/insecure/channel_create.c
472 src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
David Garcia Quintas7c3ba122016-07-14 11:38:38 -0700473 src/core/ext/lb_policy/grpclb/grpclb.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100474 src/core/ext/lb_policy/grpclb/load_balancer_api.c
475 src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
476 third_party/nanopb/pb_common.c
477 third_party/nanopb/pb_decode.c
478 third_party/nanopb/pb_encode.c
479 src/core/ext/lb_policy/pick_first/pick_first.c
480 src/core/ext/lb_policy/round_robin/round_robin.c
481 src/core/ext/resolver/dns/native/dns_resolver.c
482 src/core/ext/resolver/sockaddr/sockaddr_resolver.c
483 src/core/ext/load_reporting/load_reporting.c
484 src/core/ext/load_reporting/load_reporting_filter.c
Alistair Veitch3abd27e2016-07-21 17:29:04 -0700485 src/core/ext/census/base_resources.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100486 src/core/ext/census/context.c
487 src/core/ext/census/gen/census.pb.c
Alistair Veitcha0c69f92016-08-31 12:01:27 -0700488 src/core/ext/census/gen/trace_context.pb.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100489 src/core/ext/census/grpc_context.c
490 src/core/ext/census/grpc_filter.c
491 src/core/ext/census/grpc_plugin.c
492 src/core/ext/census/initialize.c
493 src/core/ext/census/mlog.c
494 src/core/ext/census/operation.c
495 src/core/ext/census/placeholders.c
Alistair Veitch3abd27e2016-07-21 17:29:04 -0700496 src/core/ext/census/resource.c
Vizerai12d1fc62016-09-09 14:22:19 -0700497 src/core/ext/census/trace_context.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100498 src/core/ext/census/tracing.c
499 src/core/plugin_registry/grpc_plugin_registry.c
500)
501
502target_include_directories(grpc
503 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
504 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
505 PRIVATE ${BORINGSSL_ROOT_DIR}/include
506 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300507 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100508 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
509)
510
511target_link_libraries(grpc
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300512 ${_gRPC_BASELIB_LIBRARIES}
513 ${_gRPC_SSL_LIBRARIES}
514 ${_gRPC_ZLIB_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100515 gpr
516)
517
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300518foreach(_hdr
519 include/grpc/byte_buffer.h
520 include/grpc/byte_buffer_reader.h
521 include/grpc/compression.h
522 include/grpc/grpc.h
523 include/grpc/grpc_posix.h
Nicolas "Pixel" Noblee3e17d32016-08-20 01:45:32 +0200524 include/grpc/grpc_security_constants.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300525 include/grpc/status.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300526 include/grpc/impl/codegen/byte_buffer_reader.h
527 include/grpc/impl/codegen/compression_types.h
528 include/grpc/impl/codegen/connectivity_state.h
529 include/grpc/impl/codegen/grpc_types.h
530 include/grpc/impl/codegen/propagation_bits.h
531 include/grpc/impl/codegen/status.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300532 include/grpc/impl/codegen/atm.h
533 include/grpc/impl/codegen/atm_gcc_atomic.h
534 include/grpc/impl/codegen/atm_gcc_sync.h
535 include/grpc/impl/codegen/atm_windows.h
David Garcia Quintas44cb6c92016-08-02 10:26:51 -0700536 include/grpc/impl/codegen/gpr_types.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300537 include/grpc/impl/codegen/port_platform.h
538 include/grpc/impl/codegen/slice.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300539 include/grpc/impl/codegen/sync.h
540 include/grpc/impl/codegen/sync_generic.h
541 include/grpc/impl/codegen/sync_posix.h
542 include/grpc/impl/codegen/sync_windows.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300543 include/grpc/grpc_security.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300544 include/grpc/census.h
545)
546 string(REPLACE "include/" "" _path ${_hdr})
547 get_filename_component(_path ${_path} PATH)
548 install(FILES ${_hdr}
549 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
550 )
551endforeach()
552
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +0200553
Arkadiy Shapkin40beb372016-08-17 14:42:36 +0300554if (gRPC_INSTALL)
555 install(TARGETS grpc EXPORT gRPCTargets
556 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
557 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
558 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
559 )
560endif()
561
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +0200562
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100563add_library(grpc_cronet
564 src/core/lib/surface/init.c
565 src/core/lib/channel/channel_args.c
566 src/core/lib/channel/channel_stack.c
567 src/core/lib/channel/channel_stack_builder.c
568 src/core/lib/channel/compress_filter.c
569 src/core/lib/channel/connected_channel.c
Mark D. Roth14c072c2016-08-26 08:31:34 -0700570 src/core/lib/channel/deadline_filter.c
Mark D. Rothdfbdefe2016-07-14 09:18:22 -0700571 src/core/lib/channel/handshaker.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100572 src/core/lib/channel/http_client_filter.c
573 src/core/lib/channel/http_server_filter.c
Mark D. Rothaf00d8b2016-08-23 12:48:16 -0700574 src/core/lib/channel/message_size_filter.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100575 src/core/lib/compression/compression.c
576 src/core/lib/compression/message_compress.c
577 src/core/lib/debug/trace.c
578 src/core/lib/http/format_request.c
579 src/core/lib/http/httpcli.c
580 src/core/lib/http/parser.c
581 src/core/lib/iomgr/closure.c
Craig Tiller57726ca2016-09-12 11:59:45 -0700582 src/core/lib/iomgr/combiner.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100583 src/core/lib/iomgr/endpoint.c
584 src/core/lib/iomgr/endpoint_pair_posix.c
murgatroid99c36f6ea2016-10-03 09:24:09 -0700585 src/core/lib/iomgr/endpoint_pair_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100586 src/core/lib/iomgr/endpoint_pair_windows.c
587 src/core/lib/iomgr/error.c
Nicolas "Pixel" Nobleb360c8a2016-07-02 00:54:28 +0200588 src/core/lib/iomgr/ev_epoll_linux.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100589 src/core/lib/iomgr/ev_poll_and_epoll_posix.c
590 src/core/lib/iomgr/ev_poll_posix.c
591 src/core/lib/iomgr/ev_posix.c
592 src/core/lib/iomgr/exec_ctx.c
593 src/core/lib/iomgr/executor.c
594 src/core/lib/iomgr/iocp_windows.c
595 src/core/lib/iomgr/iomgr.c
596 src/core/lib/iomgr/iomgr_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700597 src/core/lib/iomgr/iomgr_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100598 src/core/lib/iomgr/iomgr_windows.c
599 src/core/lib/iomgr/load_file.c
Nicolas "Pixel" Nobleb360c8a2016-07-02 00:54:28 +0200600 src/core/lib/iomgr/network_status_tracker.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100601 src/core/lib/iomgr/polling_entity.c
murgatroid999030c812016-09-16 13:25:08 -0700602 src/core/lib/iomgr/pollset_set_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100603 src/core/lib/iomgr/pollset_set_windows.c
murgatroid999030c812016-09-16 13:25:08 -0700604 src/core/lib/iomgr/pollset_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100605 src/core/lib/iomgr/pollset_windows.c
606 src/core/lib/iomgr/resolve_address_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700607 src/core/lib/iomgr/resolve_address_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100608 src/core/lib/iomgr/resolve_address_windows.c
609 src/core/lib/iomgr/sockaddr_utils.c
610 src/core/lib/iomgr/socket_utils_common_posix.c
611 src/core/lib/iomgr/socket_utils_linux.c
612 src/core/lib/iomgr/socket_utils_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700613 src/core/lib/iomgr/socket_utils_uv.c
murgatroid9979b32272016-08-08 13:38:30 -0700614 src/core/lib/iomgr/socket_utils_windows.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100615 src/core/lib/iomgr/socket_windows.c
616 src/core/lib/iomgr/tcp_client_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700617 src/core/lib/iomgr/tcp_client_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100618 src/core/lib/iomgr/tcp_client_windows.c
619 src/core/lib/iomgr/tcp_posix.c
620 src/core/lib/iomgr/tcp_server_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700621 src/core/lib/iomgr/tcp_server_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100622 src/core/lib/iomgr/tcp_server_windows.c
murgatroid999030c812016-09-16 13:25:08 -0700623 src/core/lib/iomgr/tcp_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100624 src/core/lib/iomgr/tcp_windows.c
625 src/core/lib/iomgr/time_averaged_stats.c
murgatroid999030c812016-09-16 13:25:08 -0700626 src/core/lib/iomgr/timer_generic.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100627 src/core/lib/iomgr/timer_heap.c
murgatroid999030c812016-09-16 13:25:08 -0700628 src/core/lib/iomgr/timer_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100629 src/core/lib/iomgr/udp_server.c
630 src/core/lib/iomgr/unix_sockets_posix.c
631 src/core/lib/iomgr/unix_sockets_posix_noop.c
kpayson64d195cf52016-10-09 18:04:00 -0700632 src/core/lib/iomgr/wakeup_fd_cv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100633 src/core/lib/iomgr/wakeup_fd_eventfd.c
634 src/core/lib/iomgr/wakeup_fd_nospecial.c
635 src/core/lib/iomgr/wakeup_fd_pipe.c
636 src/core/lib/iomgr/wakeup_fd_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700637 src/core/lib/iomgr/workqueue_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100638 src/core/lib/iomgr/workqueue_windows.c
639 src/core/lib/json/json.c
640 src/core/lib/json/json_reader.c
641 src/core/lib/json/json_string.c
642 src/core/lib/json/json_writer.c
643 src/core/lib/surface/alarm.c
644 src/core/lib/surface/api_trace.c
645 src/core/lib/surface/byte_buffer.c
646 src/core/lib/surface/byte_buffer_reader.c
647 src/core/lib/surface/call.c
648 src/core/lib/surface/call_details.c
649 src/core/lib/surface/call_log_batch.c
650 src/core/lib/surface/channel.c
651 src/core/lib/surface/channel_init.c
652 src/core/lib/surface/channel_ping.c
653 src/core/lib/surface/channel_stack_type.c
654 src/core/lib/surface/completion_queue.c
655 src/core/lib/surface/event_string.c
656 src/core/lib/surface/lame_client.c
657 src/core/lib/surface/metadata_array.c
658 src/core/lib/surface/server.c
659 src/core/lib/surface/validate_metadata.c
660 src/core/lib/surface/version.c
661 src/core/lib/transport/byte_stream.c
662 src/core/lib/transport/connectivity_state.c
Mark D. Roth6a721b52016-10-14 12:43:34 -0700663 src/core/lib/transport/mdstr_hash_table.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100664 src/core/lib/transport/metadata.c
665 src/core/lib/transport/metadata_batch.c
Mark D. Rothbfe56802016-10-26 12:45:20 -0700666 src/core/lib/transport/method_config.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100667 src/core/lib/transport/static_metadata.c
Robbie Shade710d2422016-07-13 15:15:38 -0400668 src/core/lib/transport/timeout_encoding.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100669 src/core/lib/transport/transport.c
670 src/core/lib/transport/transport_op_string.c
671 src/core/ext/transport/cronet/client/secure/cronet_channel_create.c
672 src/core/ext/transport/cronet/transport/cronet_api_dummy.c
673 src/core/ext/transport/cronet/transport/cronet_transport.c
674 src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
675 src/core/ext/transport/chttp2/transport/bin_decoder.c
676 src/core/ext/transport/chttp2/transport/bin_encoder.c
677 src/core/ext/transport/chttp2/transport/chttp2_plugin.c
678 src/core/ext/transport/chttp2/transport/chttp2_transport.c
679 src/core/ext/transport/chttp2/transport/frame_data.c
680 src/core/ext/transport/chttp2/transport/frame_goaway.c
681 src/core/ext/transport/chttp2/transport/frame_ping.c
682 src/core/ext/transport/chttp2/transport/frame_rst_stream.c
683 src/core/ext/transport/chttp2/transport/frame_settings.c
684 src/core/ext/transport/chttp2/transport/frame_window_update.c
685 src/core/ext/transport/chttp2/transport/hpack_encoder.c
686 src/core/ext/transport/chttp2/transport/hpack_parser.c
687 src/core/ext/transport/chttp2/transport/hpack_table.c
688 src/core/ext/transport/chttp2/transport/huffsyms.c
689 src/core/ext/transport/chttp2/transport/incoming_metadata.c
690 src/core/ext/transport/chttp2/transport/parsing.c
691 src/core/ext/transport/chttp2/transport/status_conversion.c
692 src/core/ext/transport/chttp2/transport/stream_lists.c
693 src/core/ext/transport/chttp2/transport/stream_map.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100694 src/core/ext/transport/chttp2/transport/varint.c
695 src/core/ext/transport/chttp2/transport/writing.c
696 src/core/ext/transport/chttp2/alpn/alpn.c
Mark D. Roth2137cd82016-09-14 09:04:00 -0700697 src/core/ext/client_channel/channel_connectivity.c
698 src/core/ext/client_channel/client_channel.c
699 src/core/ext/client_channel/client_channel_factory.c
700 src/core/ext/client_channel/client_channel_plugin.c
701 src/core/ext/client_channel/connector.c
702 src/core/ext/client_channel/default_initial_connect_string.c
Mark D. Roth15195742016-10-07 09:02:28 -0700703 src/core/ext/client_channel/http_connect_handshaker.c
Mark D. Roth2137cd82016-09-14 09:04:00 -0700704 src/core/ext/client_channel/initial_connect_string.c
705 src/core/ext/client_channel/lb_policy.c
706 src/core/ext/client_channel/lb_policy_factory.c
707 src/core/ext/client_channel/lb_policy_registry.c
708 src/core/ext/client_channel/parse_address.c
709 src/core/ext/client_channel/resolver.c
710 src/core/ext/client_channel/resolver_factory.c
711 src/core/ext/client_channel/resolver_registry.c
712 src/core/ext/client_channel/resolver_result.c
713 src/core/ext/client_channel/subchannel.c
714 src/core/ext/client_channel/subchannel_index.c
715 src/core/ext/client_channel/uri_parser.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100716 src/core/lib/http/httpcli_security_connector.c
717 src/core/lib/security/context/security_context.c
718 src/core/lib/security/credentials/composite/composite_credentials.c
719 src/core/lib/security/credentials/credentials.c
720 src/core/lib/security/credentials/credentials_metadata.c
721 src/core/lib/security/credentials/fake/fake_credentials.c
murgatroid997c205902016-08-09 10:07:42 -0700722 src/core/lib/security/credentials/google_default/credentials_generic.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100723 src/core/lib/security/credentials/google_default/google_default_credentials.c
724 src/core/lib/security/credentials/iam/iam_credentials.c
725 src/core/lib/security/credentials/jwt/json_token.c
726 src/core/lib/security/credentials/jwt/jwt_credentials.c
727 src/core/lib/security/credentials/jwt/jwt_verifier.c
728 src/core/lib/security/credentials/oauth2/oauth2_credentials.c
729 src/core/lib/security/credentials/plugin/plugin_credentials.c
730 src/core/lib/security/credentials/ssl/ssl_credentials.c
731 src/core/lib/security/transport/client_auth_filter.c
732 src/core/lib/security/transport/handshake.c
733 src/core/lib/security/transport/secure_endpoint.c
734 src/core/lib/security/transport/security_connector.c
735 src/core/lib/security/transport/server_auth_filter.c
736 src/core/lib/security/transport/tsi_error.c
737 src/core/lib/security/util/b64.c
738 src/core/lib/security/util/json_util.c
739 src/core/lib/surface/init_secure.c
740 src/core/lib/tsi/fake_transport_security.c
741 src/core/lib/tsi/ssl_transport_security.c
742 src/core/lib/tsi/transport_security.c
743 src/core/plugin_registry/grpc_cronet_plugin_registry.c
744)
745
746target_include_directories(grpc_cronet
747 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
748 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
749 PRIVATE ${BORINGSSL_ROOT_DIR}/include
750 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300751 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100752 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
753)
754
755target_link_libraries(grpc_cronet
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300756 ${_gRPC_BASELIB_LIBRARIES}
757 ${_gRPC_SSL_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100758 gpr
759)
760
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300761foreach(_hdr
762 include/grpc/byte_buffer.h
763 include/grpc/byte_buffer_reader.h
764 include/grpc/compression.h
765 include/grpc/grpc.h
766 include/grpc/grpc_posix.h
Nicolas "Pixel" Noblee3e17d32016-08-20 01:45:32 +0200767 include/grpc/grpc_security_constants.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300768 include/grpc/status.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300769 include/grpc/impl/codegen/byte_buffer_reader.h
770 include/grpc/impl/codegen/compression_types.h
771 include/grpc/impl/codegen/connectivity_state.h
772 include/grpc/impl/codegen/grpc_types.h
773 include/grpc/impl/codegen/propagation_bits.h
774 include/grpc/impl/codegen/status.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300775 include/grpc/impl/codegen/atm.h
776 include/grpc/impl/codegen/atm_gcc_atomic.h
777 include/grpc/impl/codegen/atm_gcc_sync.h
778 include/grpc/impl/codegen/atm_windows.h
David Garcia Quintas44cb6c92016-08-02 10:26:51 -0700779 include/grpc/impl/codegen/gpr_types.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300780 include/grpc/impl/codegen/port_platform.h
781 include/grpc/impl/codegen/slice.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300782 include/grpc/impl/codegen/sync.h
783 include/grpc/impl/codegen/sync_generic.h
784 include/grpc/impl/codegen/sync_posix.h
785 include/grpc/impl/codegen/sync_windows.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300786 include/grpc/grpc_cronet.h
787 include/grpc/grpc_security.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +0300788)
789 string(REPLACE "include/" "" _path ${_hdr})
790 get_filename_component(_path ${_path} PATH)
791 install(FILES ${_hdr}
792 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
793 )
794endforeach()
795
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +0200796
Arkadiy Shapkin40beb372016-08-17 14:42:36 +0300797if (gRPC_INSTALL)
798 install(TARGETS grpc_cronet EXPORT gRPCTargets
799 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
800 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
801 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
802 )
803endif()
804
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +0200805
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100806add_library(grpc_unsecure
807 src/core/lib/surface/init.c
808 src/core/lib/surface/init_unsecure.c
809 src/core/lib/channel/channel_args.c
810 src/core/lib/channel/channel_stack.c
811 src/core/lib/channel/channel_stack_builder.c
812 src/core/lib/channel/compress_filter.c
813 src/core/lib/channel/connected_channel.c
Mark D. Roth14c072c2016-08-26 08:31:34 -0700814 src/core/lib/channel/deadline_filter.c
Mark D. Rothdfbdefe2016-07-14 09:18:22 -0700815 src/core/lib/channel/handshaker.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100816 src/core/lib/channel/http_client_filter.c
817 src/core/lib/channel/http_server_filter.c
Mark D. Rothaf00d8b2016-08-23 12:48:16 -0700818 src/core/lib/channel/message_size_filter.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100819 src/core/lib/compression/compression.c
820 src/core/lib/compression/message_compress.c
821 src/core/lib/debug/trace.c
822 src/core/lib/http/format_request.c
823 src/core/lib/http/httpcli.c
824 src/core/lib/http/parser.c
825 src/core/lib/iomgr/closure.c
Craig Tiller57726ca2016-09-12 11:59:45 -0700826 src/core/lib/iomgr/combiner.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100827 src/core/lib/iomgr/endpoint.c
828 src/core/lib/iomgr/endpoint_pair_posix.c
murgatroid99c36f6ea2016-10-03 09:24:09 -0700829 src/core/lib/iomgr/endpoint_pair_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100830 src/core/lib/iomgr/endpoint_pair_windows.c
831 src/core/lib/iomgr/error.c
Nicolas "Pixel" Nobleb360c8a2016-07-02 00:54:28 +0200832 src/core/lib/iomgr/ev_epoll_linux.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100833 src/core/lib/iomgr/ev_poll_and_epoll_posix.c
834 src/core/lib/iomgr/ev_poll_posix.c
835 src/core/lib/iomgr/ev_posix.c
836 src/core/lib/iomgr/exec_ctx.c
837 src/core/lib/iomgr/executor.c
838 src/core/lib/iomgr/iocp_windows.c
839 src/core/lib/iomgr/iomgr.c
840 src/core/lib/iomgr/iomgr_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700841 src/core/lib/iomgr/iomgr_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100842 src/core/lib/iomgr/iomgr_windows.c
843 src/core/lib/iomgr/load_file.c
Nicolas "Pixel" Nobleb360c8a2016-07-02 00:54:28 +0200844 src/core/lib/iomgr/network_status_tracker.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100845 src/core/lib/iomgr/polling_entity.c
murgatroid999030c812016-09-16 13:25:08 -0700846 src/core/lib/iomgr/pollset_set_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100847 src/core/lib/iomgr/pollset_set_windows.c
murgatroid999030c812016-09-16 13:25:08 -0700848 src/core/lib/iomgr/pollset_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100849 src/core/lib/iomgr/pollset_windows.c
850 src/core/lib/iomgr/resolve_address_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700851 src/core/lib/iomgr/resolve_address_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100852 src/core/lib/iomgr/resolve_address_windows.c
853 src/core/lib/iomgr/sockaddr_utils.c
854 src/core/lib/iomgr/socket_utils_common_posix.c
855 src/core/lib/iomgr/socket_utils_linux.c
856 src/core/lib/iomgr/socket_utils_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700857 src/core/lib/iomgr/socket_utils_uv.c
murgatroid9979b32272016-08-08 13:38:30 -0700858 src/core/lib/iomgr/socket_utils_windows.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100859 src/core/lib/iomgr/socket_windows.c
860 src/core/lib/iomgr/tcp_client_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700861 src/core/lib/iomgr/tcp_client_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100862 src/core/lib/iomgr/tcp_client_windows.c
863 src/core/lib/iomgr/tcp_posix.c
864 src/core/lib/iomgr/tcp_server_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700865 src/core/lib/iomgr/tcp_server_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100866 src/core/lib/iomgr/tcp_server_windows.c
murgatroid999030c812016-09-16 13:25:08 -0700867 src/core/lib/iomgr/tcp_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100868 src/core/lib/iomgr/tcp_windows.c
869 src/core/lib/iomgr/time_averaged_stats.c
murgatroid999030c812016-09-16 13:25:08 -0700870 src/core/lib/iomgr/timer_generic.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100871 src/core/lib/iomgr/timer_heap.c
murgatroid999030c812016-09-16 13:25:08 -0700872 src/core/lib/iomgr/timer_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100873 src/core/lib/iomgr/udp_server.c
874 src/core/lib/iomgr/unix_sockets_posix.c
875 src/core/lib/iomgr/unix_sockets_posix_noop.c
kpayson64d195cf52016-10-09 18:04:00 -0700876 src/core/lib/iomgr/wakeup_fd_cv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100877 src/core/lib/iomgr/wakeup_fd_eventfd.c
878 src/core/lib/iomgr/wakeup_fd_nospecial.c
879 src/core/lib/iomgr/wakeup_fd_pipe.c
880 src/core/lib/iomgr/wakeup_fd_posix.c
murgatroid999030c812016-09-16 13:25:08 -0700881 src/core/lib/iomgr/workqueue_uv.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100882 src/core/lib/iomgr/workqueue_windows.c
883 src/core/lib/json/json.c
884 src/core/lib/json/json_reader.c
885 src/core/lib/json/json_string.c
886 src/core/lib/json/json_writer.c
887 src/core/lib/surface/alarm.c
888 src/core/lib/surface/api_trace.c
889 src/core/lib/surface/byte_buffer.c
890 src/core/lib/surface/byte_buffer_reader.c
891 src/core/lib/surface/call.c
892 src/core/lib/surface/call_details.c
893 src/core/lib/surface/call_log_batch.c
894 src/core/lib/surface/channel.c
895 src/core/lib/surface/channel_init.c
896 src/core/lib/surface/channel_ping.c
897 src/core/lib/surface/channel_stack_type.c
898 src/core/lib/surface/completion_queue.c
899 src/core/lib/surface/event_string.c
900 src/core/lib/surface/lame_client.c
901 src/core/lib/surface/metadata_array.c
902 src/core/lib/surface/server.c
903 src/core/lib/surface/validate_metadata.c
904 src/core/lib/surface/version.c
905 src/core/lib/transport/byte_stream.c
906 src/core/lib/transport/connectivity_state.c
Mark D. Roth6a721b52016-10-14 12:43:34 -0700907 src/core/lib/transport/mdstr_hash_table.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100908 src/core/lib/transport/metadata.c
909 src/core/lib/transport/metadata_batch.c
Mark D. Rothbfe56802016-10-26 12:45:20 -0700910 src/core/lib/transport/method_config.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100911 src/core/lib/transport/static_metadata.c
Robbie Shade710d2422016-07-13 15:15:38 -0400912 src/core/lib/transport/timeout_encoding.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100913 src/core/lib/transport/transport.c
914 src/core/lib/transport/transport_op_string.c
915 src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
916 src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
917 src/core/ext/transport/chttp2/transport/bin_decoder.c
918 src/core/ext/transport/chttp2/transport/bin_encoder.c
919 src/core/ext/transport/chttp2/transport/chttp2_plugin.c
920 src/core/ext/transport/chttp2/transport/chttp2_transport.c
921 src/core/ext/transport/chttp2/transport/frame_data.c
922 src/core/ext/transport/chttp2/transport/frame_goaway.c
923 src/core/ext/transport/chttp2/transport/frame_ping.c
924 src/core/ext/transport/chttp2/transport/frame_rst_stream.c
925 src/core/ext/transport/chttp2/transport/frame_settings.c
926 src/core/ext/transport/chttp2/transport/frame_window_update.c
927 src/core/ext/transport/chttp2/transport/hpack_encoder.c
928 src/core/ext/transport/chttp2/transport/hpack_parser.c
929 src/core/ext/transport/chttp2/transport/hpack_table.c
930 src/core/ext/transport/chttp2/transport/huffsyms.c
931 src/core/ext/transport/chttp2/transport/incoming_metadata.c
932 src/core/ext/transport/chttp2/transport/parsing.c
933 src/core/ext/transport/chttp2/transport/status_conversion.c
934 src/core/ext/transport/chttp2/transport/stream_lists.c
935 src/core/ext/transport/chttp2/transport/stream_map.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100936 src/core/ext/transport/chttp2/transport/varint.c
937 src/core/ext/transport/chttp2/transport/writing.c
938 src/core/ext/transport/chttp2/alpn/alpn.c
939 src/core/ext/transport/chttp2/client/insecure/channel_create.c
940 src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
Mark D. Roth2137cd82016-09-14 09:04:00 -0700941 src/core/ext/client_channel/channel_connectivity.c
942 src/core/ext/client_channel/client_channel.c
943 src/core/ext/client_channel/client_channel_factory.c
944 src/core/ext/client_channel/client_channel_plugin.c
945 src/core/ext/client_channel/connector.c
946 src/core/ext/client_channel/default_initial_connect_string.c
Mark D. Roth15195742016-10-07 09:02:28 -0700947 src/core/ext/client_channel/http_connect_handshaker.c
Mark D. Roth2137cd82016-09-14 09:04:00 -0700948 src/core/ext/client_channel/initial_connect_string.c
949 src/core/ext/client_channel/lb_policy.c
950 src/core/ext/client_channel/lb_policy_factory.c
951 src/core/ext/client_channel/lb_policy_registry.c
952 src/core/ext/client_channel/parse_address.c
953 src/core/ext/client_channel/resolver.c
954 src/core/ext/client_channel/resolver_factory.c
955 src/core/ext/client_channel/resolver_registry.c
956 src/core/ext/client_channel/resolver_result.c
957 src/core/ext/client_channel/subchannel.c
958 src/core/ext/client_channel/subchannel_index.c
959 src/core/ext/client_channel/uri_parser.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100960 src/core/ext/resolver/dns/native/dns_resolver.c
961 src/core/ext/resolver/sockaddr/sockaddr_resolver.c
962 src/core/ext/load_reporting/load_reporting.c
963 src/core/ext/load_reporting/load_reporting_filter.c
David Garcia Quintas7c3ba122016-07-14 11:38:38 -0700964 src/core/ext/lb_policy/grpclb/grpclb.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100965 src/core/ext/lb_policy/grpclb/load_balancer_api.c
966 src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
967 third_party/nanopb/pb_common.c
968 third_party/nanopb/pb_decode.c
969 third_party/nanopb/pb_encode.c
970 src/core/ext/lb_policy/pick_first/pick_first.c
971 src/core/ext/lb_policy/round_robin/round_robin.c
Alistair Veitch3abd27e2016-07-21 17:29:04 -0700972 src/core/ext/census/base_resources.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100973 src/core/ext/census/context.c
974 src/core/ext/census/gen/census.pb.c
Alistair Veitcha0c69f92016-08-31 12:01:27 -0700975 src/core/ext/census/gen/trace_context.pb.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100976 src/core/ext/census/grpc_context.c
977 src/core/ext/census/grpc_filter.c
978 src/core/ext/census/grpc_plugin.c
979 src/core/ext/census/initialize.c
980 src/core/ext/census/mlog.c
981 src/core/ext/census/operation.c
982 src/core/ext/census/placeholders.c
Alistair Veitch3abd27e2016-07-21 17:29:04 -0700983 src/core/ext/census/resource.c
Vizerai12d1fc62016-09-09 14:22:19 -0700984 src/core/ext/census/trace_context.c
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100985 src/core/ext/census/tracing.c
986 src/core/plugin_registry/grpc_unsecure_plugin_registry.c
987)
988
989target_include_directories(grpc_unsecure
990 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
991 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
992 PRIVATE ${BORINGSSL_ROOT_DIR}/include
993 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300994 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +0100995 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
996)
997
998target_link_libraries(grpc_unsecure
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +0300999 ${_gRPC_BASELIB_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001000 gpr
1001)
1002
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001003foreach(_hdr
1004 include/grpc/byte_buffer.h
1005 include/grpc/byte_buffer_reader.h
1006 include/grpc/compression.h
1007 include/grpc/grpc.h
1008 include/grpc/grpc_posix.h
Nicolas "Pixel" Noblee3e17d32016-08-20 01:45:32 +02001009 include/grpc/grpc_security_constants.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001010 include/grpc/status.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001011 include/grpc/impl/codegen/byte_buffer_reader.h
1012 include/grpc/impl/codegen/compression_types.h
1013 include/grpc/impl/codegen/connectivity_state.h
1014 include/grpc/impl/codegen/grpc_types.h
1015 include/grpc/impl/codegen/propagation_bits.h
1016 include/grpc/impl/codegen/status.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001017 include/grpc/impl/codegen/atm.h
1018 include/grpc/impl/codegen/atm_gcc_atomic.h
1019 include/grpc/impl/codegen/atm_gcc_sync.h
1020 include/grpc/impl/codegen/atm_windows.h
David Garcia Quintas44cb6c92016-08-02 10:26:51 -07001021 include/grpc/impl/codegen/gpr_types.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001022 include/grpc/impl/codegen/port_platform.h
1023 include/grpc/impl/codegen/slice.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001024 include/grpc/impl/codegen/sync.h
1025 include/grpc/impl/codegen/sync_generic.h
1026 include/grpc/impl/codegen/sync_posix.h
1027 include/grpc/impl/codegen/sync_windows.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001028 include/grpc/census.h
1029)
1030 string(REPLACE "include/" "" _path ${_hdr})
1031 get_filename_component(_path ${_path} PATH)
1032 install(FILES ${_hdr}
1033 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
1034 )
1035endforeach()
1036
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001037
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001038if (gRPC_INSTALL)
1039 install(TARGETS grpc_unsecure EXPORT gRPCTargets
1040 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1041 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1042 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1043 )
1044endif()
1045
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001046
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001047add_library(grpc++
murgatroid991ca0f3e2016-08-26 14:58:49 -07001048 src/cpp/client/insecure_credentials.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001049 src/cpp/client/secure_credentials.cc
1050 src/cpp/common/auth_property_iterator.cc
1051 src/cpp/common/secure_auth_context.cc
1052 src/cpp/common/secure_channel_arguments.cc
1053 src/cpp/common/secure_create_auth_context.cc
murgatroid991ca0f3e2016-08-26 14:58:49 -07001054 src/cpp/server/insecure_server_credentials.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001055 src/cpp/server/secure_server_credentials.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001056 src/cpp/client/channel_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001057 src/cpp/client/client_context.cc
1058 src/cpp/client/create_channel.cc
1059 src/cpp/client/create_channel_internal.cc
1060 src/cpp/client/create_channel_posix.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001061 src/cpp/client/credentials_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001062 src/cpp/client/generic_stub.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001063 src/cpp/common/channel_arguments.cc
Mark D. Roth4004ac22016-08-02 10:08:27 -07001064 src/cpp/common/channel_filter.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001065 src/cpp/common/completion_queue_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001066 src/cpp/common/core_codegen.cc
1067 src/cpp/common/rpc_method.cc
1068 src/cpp/server/async_generic_service.cc
1069 src/cpp/server/create_default_thread_pool.cc
1070 src/cpp/server/dynamic_thread_pool.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001071 src/cpp/server/server_builder.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001072 src/cpp/server/server_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001073 src/cpp/server/server_context.cc
1074 src/cpp/server/server_credentials.cc
1075 src/cpp/server/server_posix.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001076 src/cpp/util/byte_buffer_cc.cc
1077 src/cpp/util/slice_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001078 src/cpp/util/status.cc
1079 src/cpp/util/string_ref.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001080 src/cpp/util/time_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001081 src/cpp/codegen/codegen_init.cc
1082)
1083
1084target_include_directories(grpc++
1085 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1086 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1087 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1088 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001089 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001090 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1091)
1092
1093target_link_libraries(grpc++
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001094 ${_gRPC_BASELIB_LIBRARIES}
1095 ${_gRPC_SSL_LIBRARIES}
1096 ${_gRPC_PROTOBUF_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001097 grpc
1098)
1099
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001100foreach(_hdr
1101 include/grpc++/alarm.h
1102 include/grpc++/channel.h
1103 include/grpc++/client_context.h
1104 include/grpc++/completion_queue.h
1105 include/grpc++/create_channel.h
1106 include/grpc++/create_channel_posix.h
1107 include/grpc++/generic/async_generic_service.h
1108 include/grpc++/generic/generic_stub.h
1109 include/grpc++/grpc++.h
1110 include/grpc++/impl/call.h
1111 include/grpc++/impl/client_unary_call.h
1112 include/grpc++/impl/codegen/core_codegen.h
1113 include/grpc++/impl/grpc_library.h
1114 include/grpc++/impl/method_handler_impl.h
1115 include/grpc++/impl/rpc_method.h
1116 include/grpc++/impl/rpc_service_method.h
1117 include/grpc++/impl/serialization_traits.h
1118 include/grpc++/impl/server_builder_option.h
1119 include/grpc++/impl/server_builder_plugin.h
1120 include/grpc++/impl/server_initializer.h
1121 include/grpc++/impl/service_type.h
1122 include/grpc++/impl/sync.h
1123 include/grpc++/impl/sync_cxx11.h
1124 include/grpc++/impl/sync_no_cxx11.h
1125 include/grpc++/impl/thd.h
1126 include/grpc++/impl/thd_cxx11.h
1127 include/grpc++/impl/thd_no_cxx11.h
1128 include/grpc++/security/auth_context.h
1129 include/grpc++/security/auth_metadata_processor.h
1130 include/grpc++/security/credentials.h
1131 include/grpc++/security/server_credentials.h
1132 include/grpc++/server.h
1133 include/grpc++/server_builder.h
1134 include/grpc++/server_context.h
1135 include/grpc++/server_posix.h
1136 include/grpc++/support/async_stream.h
1137 include/grpc++/support/async_unary_call.h
1138 include/grpc++/support/byte_buffer.h
1139 include/grpc++/support/channel_arguments.h
1140 include/grpc++/support/config.h
1141 include/grpc++/support/slice.h
1142 include/grpc++/support/status.h
1143 include/grpc++/support/status_code_enum.h
1144 include/grpc++/support/string_ref.h
1145 include/grpc++/support/stub_options.h
1146 include/grpc++/support/sync_stream.h
1147 include/grpc++/support/time.h
1148 include/grpc++/impl/codegen/async_stream.h
1149 include/grpc++/impl/codegen/async_unary_call.h
1150 include/grpc++/impl/codegen/call.h
1151 include/grpc++/impl/codegen/call_hook.h
1152 include/grpc++/impl/codegen/channel_interface.h
1153 include/grpc++/impl/codegen/client_context.h
1154 include/grpc++/impl/codegen/client_unary_call.h
1155 include/grpc++/impl/codegen/completion_queue.h
1156 include/grpc++/impl/codegen/completion_queue_tag.h
1157 include/grpc++/impl/codegen/config.h
1158 include/grpc++/impl/codegen/core_codegen_interface.h
1159 include/grpc++/impl/codegen/create_auth_context.h
1160 include/grpc++/impl/codegen/grpc_library.h
1161 include/grpc++/impl/codegen/method_handler_impl.h
1162 include/grpc++/impl/codegen/rpc_method.h
1163 include/grpc++/impl/codegen/rpc_service_method.h
1164 include/grpc++/impl/codegen/security/auth_context.h
1165 include/grpc++/impl/codegen/serialization_traits.h
1166 include/grpc++/impl/codegen/server_context.h
1167 include/grpc++/impl/codegen/server_interface.h
1168 include/grpc++/impl/codegen/service_type.h
1169 include/grpc++/impl/codegen/status.h
1170 include/grpc++/impl/codegen/status_code_enum.h
yang-gd5581492016-09-06 14:05:53 -07001171 include/grpc++/impl/codegen/status_helper.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001172 include/grpc++/impl/codegen/string_ref.h
1173 include/grpc++/impl/codegen/stub_options.h
1174 include/grpc++/impl/codegen/sync.h
1175 include/grpc++/impl/codegen/sync_cxx11.h
1176 include/grpc++/impl/codegen/sync_no_cxx11.h
1177 include/grpc++/impl/codegen/sync_stream.h
1178 include/grpc++/impl/codegen/time.h
Nicolas "Pixel" Noble87a10812016-09-29 01:31:54 +02001179 include/grpc/impl/codegen/byte_buffer_reader.h
1180 include/grpc/impl/codegen/compression_types.h
1181 include/grpc/impl/codegen/connectivity_state.h
1182 include/grpc/impl/codegen/grpc_types.h
1183 include/grpc/impl/codegen/propagation_bits.h
1184 include/grpc/impl/codegen/status.h
1185 include/grpc/impl/codegen/atm.h
1186 include/grpc/impl/codegen/atm_gcc_atomic.h
1187 include/grpc/impl/codegen/atm_gcc_sync.h
1188 include/grpc/impl/codegen/atm_windows.h
1189 include/grpc/impl/codegen/gpr_types.h
1190 include/grpc/impl/codegen/port_platform.h
1191 include/grpc/impl/codegen/slice.h
1192 include/grpc/impl/codegen/sync.h
1193 include/grpc/impl/codegen/sync_generic.h
1194 include/grpc/impl/codegen/sync_posix.h
1195 include/grpc/impl/codegen/sync_windows.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001196)
1197 string(REPLACE "include/" "" _path ${_hdr})
1198 get_filename_component(_path ${_path} PATH)
1199 install(FILES ${_hdr}
1200 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
1201 )
1202endforeach()
1203
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001204
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001205if (gRPC_INSTALL)
1206 install(TARGETS grpc++ EXPORT gRPCTargets
1207 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1208 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1209 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1210 )
1211endif()
1212
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001213
Garrett Casto931a26b2016-10-04 09:18:29 -07001214add_library(grpc++_cronet
1215 src/cpp/client/cronet_credentials.cc
1216 src/cpp/client/insecure_credentials.cc
1217 src/cpp/common/insecure_create_auth_context.cc
1218 src/cpp/server/insecure_server_credentials.cc
1219 src/cpp/client/channel_cc.cc
1220 src/cpp/client/client_context.cc
1221 src/cpp/client/create_channel.cc
1222 src/cpp/client/create_channel_internal.cc
1223 src/cpp/client/create_channel_posix.cc
1224 src/cpp/client/credentials_cc.cc
1225 src/cpp/client/generic_stub.cc
1226 src/cpp/common/channel_arguments.cc
1227 src/cpp/common/channel_filter.cc
1228 src/cpp/common/completion_queue_cc.cc
1229 src/cpp/common/core_codegen.cc
1230 src/cpp/common/rpc_method.cc
1231 src/cpp/server/async_generic_service.cc
1232 src/cpp/server/create_default_thread_pool.cc
1233 src/cpp/server/dynamic_thread_pool.cc
1234 src/cpp/server/server_builder.cc
1235 src/cpp/server/server_cc.cc
1236 src/cpp/server/server_context.cc
1237 src/cpp/server/server_credentials.cc
1238 src/cpp/server/server_posix.cc
1239 src/cpp/util/byte_buffer_cc.cc
1240 src/cpp/util/slice_cc.cc
1241 src/cpp/util/status.cc
1242 src/cpp/util/string_ref.cc
1243 src/cpp/util/time_cc.cc
1244 src/cpp/codegen/codegen_init.cc
1245)
1246
1247target_include_directories(grpc++_cronet
1248 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1249 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1250 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1251 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1252 PRIVATE ${ZLIB_INCLUDE_DIR}
1253 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1254)
1255
1256target_link_libraries(grpc++_cronet
1257 ${_gRPC_BASELIB_LIBRARIES}
1258 ${_gRPC_SSL_LIBRARIES}
1259 gpr
1260 grpc_cronet
1261)
1262
1263foreach(_hdr
1264 include/grpc++/alarm.h
1265 include/grpc++/channel.h
1266 include/grpc++/client_context.h
1267 include/grpc++/completion_queue.h
1268 include/grpc++/create_channel.h
1269 include/grpc++/create_channel_posix.h
1270 include/grpc++/generic/async_generic_service.h
1271 include/grpc++/generic/generic_stub.h
1272 include/grpc++/grpc++.h
1273 include/grpc++/impl/call.h
1274 include/grpc++/impl/client_unary_call.h
1275 include/grpc++/impl/codegen/core_codegen.h
1276 include/grpc++/impl/grpc_library.h
1277 include/grpc++/impl/method_handler_impl.h
1278 include/grpc++/impl/rpc_method.h
1279 include/grpc++/impl/rpc_service_method.h
1280 include/grpc++/impl/serialization_traits.h
1281 include/grpc++/impl/server_builder_option.h
1282 include/grpc++/impl/server_builder_plugin.h
1283 include/grpc++/impl/server_initializer.h
1284 include/grpc++/impl/service_type.h
1285 include/grpc++/impl/sync.h
1286 include/grpc++/impl/sync_cxx11.h
1287 include/grpc++/impl/sync_no_cxx11.h
1288 include/grpc++/impl/thd.h
1289 include/grpc++/impl/thd_cxx11.h
1290 include/grpc++/impl/thd_no_cxx11.h
1291 include/grpc++/security/auth_context.h
1292 include/grpc++/security/auth_metadata_processor.h
1293 include/grpc++/security/credentials.h
1294 include/grpc++/security/server_credentials.h
1295 include/grpc++/server.h
1296 include/grpc++/server_builder.h
1297 include/grpc++/server_context.h
1298 include/grpc++/server_posix.h
1299 include/grpc++/support/async_stream.h
1300 include/grpc++/support/async_unary_call.h
1301 include/grpc++/support/byte_buffer.h
1302 include/grpc++/support/channel_arguments.h
1303 include/grpc++/support/config.h
1304 include/grpc++/support/slice.h
1305 include/grpc++/support/status.h
1306 include/grpc++/support/status_code_enum.h
1307 include/grpc++/support/string_ref.h
1308 include/grpc++/support/stub_options.h
1309 include/grpc++/support/sync_stream.h
1310 include/grpc++/support/time.h
1311 include/grpc++/impl/codegen/async_stream.h
1312 include/grpc++/impl/codegen/async_unary_call.h
1313 include/grpc++/impl/codegen/call.h
1314 include/grpc++/impl/codegen/call_hook.h
1315 include/grpc++/impl/codegen/channel_interface.h
1316 include/grpc++/impl/codegen/client_context.h
1317 include/grpc++/impl/codegen/client_unary_call.h
1318 include/grpc++/impl/codegen/completion_queue.h
1319 include/grpc++/impl/codegen/completion_queue_tag.h
1320 include/grpc++/impl/codegen/config.h
1321 include/grpc++/impl/codegen/core_codegen_interface.h
1322 include/grpc++/impl/codegen/create_auth_context.h
1323 include/grpc++/impl/codegen/grpc_library.h
1324 include/grpc++/impl/codegen/method_handler_impl.h
1325 include/grpc++/impl/codegen/rpc_method.h
1326 include/grpc++/impl/codegen/rpc_service_method.h
1327 include/grpc++/impl/codegen/security/auth_context.h
1328 include/grpc++/impl/codegen/serialization_traits.h
1329 include/grpc++/impl/codegen/server_context.h
1330 include/grpc++/impl/codegen/server_interface.h
1331 include/grpc++/impl/codegen/service_type.h
1332 include/grpc++/impl/codegen/status.h
1333 include/grpc++/impl/codegen/status_code_enum.h
1334 include/grpc++/impl/codegen/status_helper.h
1335 include/grpc++/impl/codegen/string_ref.h
1336 include/grpc++/impl/codegen/stub_options.h
1337 include/grpc++/impl/codegen/sync.h
1338 include/grpc++/impl/codegen/sync_cxx11.h
1339 include/grpc++/impl/codegen/sync_no_cxx11.h
1340 include/grpc++/impl/codegen/sync_stream.h
1341 include/grpc++/impl/codegen/time.h
1342 include/grpc/impl/codegen/byte_buffer_reader.h
1343 include/grpc/impl/codegen/compression_types.h
1344 include/grpc/impl/codegen/connectivity_state.h
1345 include/grpc/impl/codegen/grpc_types.h
1346 include/grpc/impl/codegen/propagation_bits.h
1347 include/grpc/impl/codegen/status.h
1348 include/grpc/impl/codegen/atm.h
1349 include/grpc/impl/codegen/atm_gcc_atomic.h
1350 include/grpc/impl/codegen/atm_gcc_sync.h
1351 include/grpc/impl/codegen/atm_windows.h
1352 include/grpc/impl/codegen/gpr_types.h
1353 include/grpc/impl/codegen/port_platform.h
1354 include/grpc/impl/codegen/slice.h
1355 include/grpc/impl/codegen/sync.h
1356 include/grpc/impl/codegen/sync_generic.h
1357 include/grpc/impl/codegen/sync_posix.h
1358 include/grpc/impl/codegen/sync_windows.h
1359)
1360 string(REPLACE "include/" "" _path ${_hdr})
1361 get_filename_component(_path ${_path} PATH)
1362 install(FILES ${_hdr}
1363 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
1364 )
1365endforeach()
1366
1367
1368if (gRPC_INSTALL)
1369 install(TARGETS grpc++_cronet EXPORT gRPCTargets
1370 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1371 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1372 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1373 )
1374endif()
1375
1376
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001377add_library(grpc++_reflection
1378 src/cpp/ext/proto_server_reflection.cc
1379 src/cpp/ext/proto_server_reflection_plugin.cc
1380 src/cpp/ext/reflection.grpc.pb.cc
1381 src/cpp/ext/reflection.pb.cc
1382)
1383
1384target_include_directories(grpc++_reflection
1385 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1386 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1387 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1388 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001389 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001390 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1391)
1392
1393target_link_libraries(grpc++_reflection
1394 grpc++
1395)
1396
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001397foreach(_hdr
1398 include/grpc++/ext/proto_server_reflection_plugin.h
1399 include/grpc++/ext/reflection.grpc.pb.h
1400 include/grpc++/ext/reflection.pb.h
1401 include/grpc++/impl/codegen/proto_utils.h
1402 include/grpc++/impl/codegen/async_stream.h
1403 include/grpc++/impl/codegen/async_unary_call.h
1404 include/grpc++/impl/codegen/call.h
1405 include/grpc++/impl/codegen/call_hook.h
1406 include/grpc++/impl/codegen/channel_interface.h
1407 include/grpc++/impl/codegen/client_context.h
1408 include/grpc++/impl/codegen/client_unary_call.h
1409 include/grpc++/impl/codegen/completion_queue.h
1410 include/grpc++/impl/codegen/completion_queue_tag.h
1411 include/grpc++/impl/codegen/config.h
1412 include/grpc++/impl/codegen/core_codegen_interface.h
1413 include/grpc++/impl/codegen/create_auth_context.h
1414 include/grpc++/impl/codegen/grpc_library.h
1415 include/grpc++/impl/codegen/method_handler_impl.h
1416 include/grpc++/impl/codegen/rpc_method.h
1417 include/grpc++/impl/codegen/rpc_service_method.h
1418 include/grpc++/impl/codegen/security/auth_context.h
1419 include/grpc++/impl/codegen/serialization_traits.h
1420 include/grpc++/impl/codegen/server_context.h
1421 include/grpc++/impl/codegen/server_interface.h
1422 include/grpc++/impl/codegen/service_type.h
1423 include/grpc++/impl/codegen/status.h
1424 include/grpc++/impl/codegen/status_code_enum.h
yang-gd5581492016-09-06 14:05:53 -07001425 include/grpc++/impl/codegen/status_helper.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001426 include/grpc++/impl/codegen/string_ref.h
1427 include/grpc++/impl/codegen/stub_options.h
1428 include/grpc++/impl/codegen/sync.h
1429 include/grpc++/impl/codegen/sync_cxx11.h
1430 include/grpc++/impl/codegen/sync_no_cxx11.h
1431 include/grpc++/impl/codegen/sync_stream.h
1432 include/grpc++/impl/codegen/time.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001433 include/grpc/impl/codegen/byte_buffer_reader.h
1434 include/grpc/impl/codegen/compression_types.h
1435 include/grpc/impl/codegen/connectivity_state.h
1436 include/grpc/impl/codegen/grpc_types.h
1437 include/grpc/impl/codegen/propagation_bits.h
1438 include/grpc/impl/codegen/status.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001439 include/grpc/impl/codegen/atm.h
1440 include/grpc/impl/codegen/atm_gcc_atomic.h
1441 include/grpc/impl/codegen/atm_gcc_sync.h
1442 include/grpc/impl/codegen/atm_windows.h
David Garcia Quintas44cb6c92016-08-02 10:26:51 -07001443 include/grpc/impl/codegen/gpr_types.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001444 include/grpc/impl/codegen/port_platform.h
1445 include/grpc/impl/codegen/slice.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001446 include/grpc/impl/codegen/sync.h
1447 include/grpc/impl/codegen/sync_generic.h
1448 include/grpc/impl/codegen/sync_posix.h
1449 include/grpc/impl/codegen/sync_windows.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001450 include/grpc++/impl/codegen/config_protobuf.h
1451)
1452 string(REPLACE "include/" "" _path ${_hdr})
1453 get_filename_component(_path ${_path} PATH)
1454 install(FILES ${_hdr}
1455 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
1456 )
1457endforeach()
1458
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001459
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001460if (gRPC_INSTALL)
1461 install(TARGETS grpc++_reflection EXPORT gRPCTargets
1462 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1463 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1464 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1465 )
1466endif()
1467
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001468
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001469add_library(grpc++_unsecure
murgatroid991ca0f3e2016-08-26 14:58:49 -07001470 src/cpp/client/insecure_credentials.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001471 src/cpp/common/insecure_create_auth_context.cc
murgatroid991ca0f3e2016-08-26 14:58:49 -07001472 src/cpp/server/insecure_server_credentials.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001473 src/cpp/client/channel_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001474 src/cpp/client/client_context.cc
1475 src/cpp/client/create_channel.cc
1476 src/cpp/client/create_channel_internal.cc
1477 src/cpp/client/create_channel_posix.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001478 src/cpp/client/credentials_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001479 src/cpp/client/generic_stub.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001480 src/cpp/common/channel_arguments.cc
Mark D. Roth4004ac22016-08-02 10:08:27 -07001481 src/cpp/common/channel_filter.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001482 src/cpp/common/completion_queue_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001483 src/cpp/common/core_codegen.cc
1484 src/cpp/common/rpc_method.cc
1485 src/cpp/server/async_generic_service.cc
1486 src/cpp/server/create_default_thread_pool.cc
1487 src/cpp/server/dynamic_thread_pool.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001488 src/cpp/server/server_builder.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001489 src/cpp/server/server_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001490 src/cpp/server/server_context.cc
1491 src/cpp/server/server_credentials.cc
1492 src/cpp/server/server_posix.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001493 src/cpp/util/byte_buffer_cc.cc
1494 src/cpp/util/slice_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001495 src/cpp/util/status.cc
1496 src/cpp/util/string_ref.cc
Craig Tiller102fa962016-08-22 13:56:36 -07001497 src/cpp/util/time_cc.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001498 src/cpp/codegen/codegen_init.cc
1499)
1500
1501target_include_directories(grpc++_unsecure
1502 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1503 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1504 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1505 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001506 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001507 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1508)
1509
1510target_link_libraries(grpc++_unsecure
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001511 ${_gRPC_BASELIB_LIBRARIES}
1512 ${_gRPC_PROTOBUF_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001513 gpr
1514 grpc_unsecure
1515)
1516
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001517foreach(_hdr
1518 include/grpc++/alarm.h
1519 include/grpc++/channel.h
1520 include/grpc++/client_context.h
1521 include/grpc++/completion_queue.h
1522 include/grpc++/create_channel.h
1523 include/grpc++/create_channel_posix.h
1524 include/grpc++/generic/async_generic_service.h
1525 include/grpc++/generic/generic_stub.h
1526 include/grpc++/grpc++.h
1527 include/grpc++/impl/call.h
1528 include/grpc++/impl/client_unary_call.h
1529 include/grpc++/impl/codegen/core_codegen.h
1530 include/grpc++/impl/grpc_library.h
1531 include/grpc++/impl/method_handler_impl.h
1532 include/grpc++/impl/rpc_method.h
1533 include/grpc++/impl/rpc_service_method.h
1534 include/grpc++/impl/serialization_traits.h
1535 include/grpc++/impl/server_builder_option.h
1536 include/grpc++/impl/server_builder_plugin.h
1537 include/grpc++/impl/server_initializer.h
1538 include/grpc++/impl/service_type.h
1539 include/grpc++/impl/sync.h
1540 include/grpc++/impl/sync_cxx11.h
1541 include/grpc++/impl/sync_no_cxx11.h
1542 include/grpc++/impl/thd.h
1543 include/grpc++/impl/thd_cxx11.h
1544 include/grpc++/impl/thd_no_cxx11.h
1545 include/grpc++/security/auth_context.h
1546 include/grpc++/security/auth_metadata_processor.h
1547 include/grpc++/security/credentials.h
1548 include/grpc++/security/server_credentials.h
1549 include/grpc++/server.h
1550 include/grpc++/server_builder.h
1551 include/grpc++/server_context.h
1552 include/grpc++/server_posix.h
1553 include/grpc++/support/async_stream.h
1554 include/grpc++/support/async_unary_call.h
1555 include/grpc++/support/byte_buffer.h
1556 include/grpc++/support/channel_arguments.h
1557 include/grpc++/support/config.h
1558 include/grpc++/support/slice.h
1559 include/grpc++/support/status.h
1560 include/grpc++/support/status_code_enum.h
1561 include/grpc++/support/string_ref.h
1562 include/grpc++/support/stub_options.h
1563 include/grpc++/support/sync_stream.h
1564 include/grpc++/support/time.h
1565 include/grpc++/impl/codegen/async_stream.h
1566 include/grpc++/impl/codegen/async_unary_call.h
1567 include/grpc++/impl/codegen/call.h
1568 include/grpc++/impl/codegen/call_hook.h
1569 include/grpc++/impl/codegen/channel_interface.h
1570 include/grpc++/impl/codegen/client_context.h
1571 include/grpc++/impl/codegen/client_unary_call.h
1572 include/grpc++/impl/codegen/completion_queue.h
1573 include/grpc++/impl/codegen/completion_queue_tag.h
1574 include/grpc++/impl/codegen/config.h
1575 include/grpc++/impl/codegen/core_codegen_interface.h
1576 include/grpc++/impl/codegen/create_auth_context.h
1577 include/grpc++/impl/codegen/grpc_library.h
1578 include/grpc++/impl/codegen/method_handler_impl.h
1579 include/grpc++/impl/codegen/rpc_method.h
1580 include/grpc++/impl/codegen/rpc_service_method.h
1581 include/grpc++/impl/codegen/security/auth_context.h
1582 include/grpc++/impl/codegen/serialization_traits.h
1583 include/grpc++/impl/codegen/server_context.h
1584 include/grpc++/impl/codegen/server_interface.h
1585 include/grpc++/impl/codegen/service_type.h
1586 include/grpc++/impl/codegen/status.h
1587 include/grpc++/impl/codegen/status_code_enum.h
yang-gd5581492016-09-06 14:05:53 -07001588 include/grpc++/impl/codegen/status_helper.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001589 include/grpc++/impl/codegen/string_ref.h
1590 include/grpc++/impl/codegen/stub_options.h
1591 include/grpc++/impl/codegen/sync.h
1592 include/grpc++/impl/codegen/sync_cxx11.h
1593 include/grpc++/impl/codegen/sync_no_cxx11.h
1594 include/grpc++/impl/codegen/sync_stream.h
1595 include/grpc++/impl/codegen/time.h
Nicolas "Pixel" Noble87a10812016-09-29 01:31:54 +02001596 include/grpc/impl/codegen/byte_buffer_reader.h
1597 include/grpc/impl/codegen/compression_types.h
1598 include/grpc/impl/codegen/connectivity_state.h
1599 include/grpc/impl/codegen/grpc_types.h
1600 include/grpc/impl/codegen/propagation_bits.h
1601 include/grpc/impl/codegen/status.h
1602 include/grpc/impl/codegen/atm.h
1603 include/grpc/impl/codegen/atm_gcc_atomic.h
1604 include/grpc/impl/codegen/atm_gcc_sync.h
1605 include/grpc/impl/codegen/atm_windows.h
1606 include/grpc/impl/codegen/gpr_types.h
1607 include/grpc/impl/codegen/port_platform.h
1608 include/grpc/impl/codegen/slice.h
1609 include/grpc/impl/codegen/sync.h
1610 include/grpc/impl/codegen/sync_generic.h
1611 include/grpc/impl/codegen/sync_posix.h
1612 include/grpc/impl/codegen/sync_windows.h
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001613)
1614 string(REPLACE "include/" "" _path ${_hdr})
1615 get_filename_component(_path ${_path} PATH)
1616 install(FILES ${_hdr}
1617 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
1618 )
1619endforeach()
1620
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001621
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001622if (gRPC_INSTALL)
1623 install(TARGETS grpc++_unsecure EXPORT gRPCTargets
1624 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1625 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1626 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1627 )
1628endif()
1629
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001630
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001631add_library(grpc_plugin_support
1632 src/compiler/cpp_generator.cc
1633 src/compiler/csharp_generator.cc
1634 src/compiler/node_generator.cc
1635 src/compiler/objective_c_generator.cc
Stanley Cheung857a1302016-09-29 17:26:29 -07001636 src/compiler/php_generator.cc
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001637 src/compiler/python_generator.cc
1638 src/compiler/ruby_generator.cc
1639)
1640
1641target_include_directories(grpc_plugin_support
1642 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1643 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1644 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1645 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001646 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001647 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1648)
1649
1650target_link_libraries(grpc_plugin_support
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001651 ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001652)
1653
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001654foreach(_hdr
1655 include/grpc++/impl/codegen/config_protobuf.h
1656)
1657 string(REPLACE "include/" "" _path ${_hdr})
1658 get_filename_component(_path ${_path} PATH)
1659 install(FILES ${_hdr}
1660 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}"
1661 )
1662endforeach()
1663
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001664
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001665if (gRPC_INSTALL)
1666 install(TARGETS grpc_plugin_support EXPORT gRPCTargets
1667 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1668 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1669 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1670 )
1671endif()
1672
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001673
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001674add_library(grpc_csharp_ext
1675 src/csharp/ext/grpc_csharp_ext.c
1676)
1677
1678target_include_directories(grpc_csharp_ext
1679 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1680 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1681 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1682 PRIVATE ${PROTOBUF_ROOT_DIR}/src
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001683 PRIVATE ${ZLIB_INCLUDE_DIR}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001684 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1685)
1686
1687target_link_libraries(grpc_csharp_ext
1688 grpc
1689 gpr
1690)
1691
1692
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001693
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001694if (gRPC_INSTALL)
1695 install(TARGETS grpc_csharp_ext EXPORT gRPCTargets
1696 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1697 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1698 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1699 )
1700endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001701
1702
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001703
Tamas Berghammerdf6a44c2016-06-22 13:38:55 +01001704add_executable(gen_hpack_tables
1705 tools/codegen/core/gen_hpack_tables.c
1706)
1707
1708target_include_directories(gen_hpack_tables
1709 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1710 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1711 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1712 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1713 PRIVATE ${ZLIB_ROOT_DIR}
1714 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1715)
1716
1717target_link_libraries(gen_hpack_tables
1718 gpr
1719 grpc
1720)
1721
1722
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001723if (gRPC_INSTALL)
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02001724 install(TARGETS gen_hpack_tables EXPORT gRPCTargets
1725 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1726 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1727 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1728 )
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001729endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001730
1731
Tamas Berghammerdf6a44c2016-06-22 13:38:55 +01001732add_executable(gen_legal_metadata_characters
1733 tools/codegen/core/gen_legal_metadata_characters.c
1734)
1735
1736target_include_directories(gen_legal_metadata_characters
1737 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1738 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1739 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1740 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1741 PRIVATE ${ZLIB_ROOT_DIR}
1742 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1743)
1744
1745
1746
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001747if (gRPC_INSTALL)
1748 install(TARGETS gen_legal_metadata_characters EXPORT gRPCTargets
1749 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1750 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1751 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1752 )
1753endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001754
1755
Craig Tiller1c7a8422016-08-18 11:13:11 -07001756add_executable(gen_percent_encoding_tables
1757 tools/codegen/core/gen_percent_encoding_tables.c
1758)
1759
1760target_include_directories(gen_percent_encoding_tables
1761 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1762 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1763 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1764 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1765 PRIVATE ${ZLIB_ROOT_DIR}
1766 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1767)
1768
1769
1770
Craig Tiller344834b2016-09-07 08:39:05 -07001771if (gRPC_INSTALL)
1772 install(TARGETS gen_percent_encoding_tables EXPORT gRPCTargets
1773 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1774 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1775 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1776 )
1777endif()
Craig Tiller1c7a8422016-08-18 11:13:11 -07001778
1779
Tamas Berghammerdf6a44c2016-06-22 13:38:55 +01001780add_executable(grpc_create_jwt
1781 test/core/security/create_jwt.c
1782)
1783
1784target_include_directories(grpc_create_jwt
1785 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1786 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1787 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1788 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1789 PRIVATE ${ZLIB_ROOT_DIR}
1790 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1791)
1792
1793target_link_libraries(grpc_create_jwt
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001794 ${_gRPC_SSL_LIBRARIES}
Tamas Berghammerdf6a44c2016-06-22 13:38:55 +01001795 grpc
1796 gpr
1797)
1798
1799
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001800if (gRPC_INSTALL)
1801 install(TARGETS grpc_create_jwt EXPORT gRPCTargets
1802 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1803 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1804 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1805 )
1806endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001807
1808
Tamas Berghammerdf6a44c2016-06-22 13:38:55 +01001809add_executable(grpc_print_google_default_creds_token
1810 test/core/security/print_google_default_creds_token.c
1811)
1812
1813target_include_directories(grpc_print_google_default_creds_token
1814 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1815 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1816 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1817 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1818 PRIVATE ${ZLIB_ROOT_DIR}
1819 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1820)
1821
1822target_link_libraries(grpc_print_google_default_creds_token
1823 grpc
1824 gpr
1825)
1826
1827
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001828if (gRPC_INSTALL)
1829 install(TARGETS grpc_print_google_default_creds_token EXPORT gRPCTargets
1830 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1831 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1832 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1833 )
1834endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001835
1836
Tamas Berghammerdf6a44c2016-06-22 13:38:55 +01001837add_executable(grpc_verify_jwt
1838 test/core/security/verify_jwt.c
1839)
1840
1841target_include_directories(grpc_verify_jwt
1842 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1843 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1844 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1845 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1846 PRIVATE ${ZLIB_ROOT_DIR}
1847 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1848)
1849
1850target_link_libraries(grpc_verify_jwt
1851 grpc
1852 gpr
1853)
1854
1855
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001856if (gRPC_INSTALL)
1857 install(TARGETS grpc_verify_jwt EXPORT gRPCTargets
1858 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1859 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1860 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1861 )
1862endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001863
1864
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001865add_executable(grpc_cpp_plugin
1866 src/compiler/cpp_plugin.cc
1867)
1868
1869target_include_directories(grpc_cpp_plugin
1870 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1871 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1872 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1873 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1874 PRIVATE ${ZLIB_ROOT_DIR}
1875 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1876)
1877
1878target_link_libraries(grpc_cpp_plugin
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001879 ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001880 grpc_plugin_support
1881)
1882
1883
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001884if (gRPC_INSTALL)
1885 install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets
1886 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1887 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1888 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1889 )
1890endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001891
1892
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001893add_executable(grpc_csharp_plugin
1894 src/compiler/csharp_plugin.cc
1895)
1896
1897target_include_directories(grpc_csharp_plugin
1898 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1899 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1900 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1901 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1902 PRIVATE ${ZLIB_ROOT_DIR}
1903 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1904)
1905
1906target_link_libraries(grpc_csharp_plugin
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001907 ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001908 grpc_plugin_support
1909)
1910
1911
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001912if (gRPC_INSTALL)
1913 install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets
1914 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1915 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1916 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1917 )
1918endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001919
1920
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001921add_executable(grpc_node_plugin
1922 src/compiler/node_plugin.cc
1923)
1924
1925target_include_directories(grpc_node_plugin
1926 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1927 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1928 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1929 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1930 PRIVATE ${ZLIB_ROOT_DIR}
1931 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1932)
1933
1934target_link_libraries(grpc_node_plugin
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001935 ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001936 grpc_plugin_support
1937)
1938
1939
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001940if (gRPC_INSTALL)
1941 install(TARGETS grpc_node_plugin EXPORT gRPCTargets
1942 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1943 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1944 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1945 )
1946endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001947
1948
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001949add_executable(grpc_objective_c_plugin
1950 src/compiler/objective_c_plugin.cc
1951)
1952
1953target_include_directories(grpc_objective_c_plugin
1954 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1955 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1956 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1957 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1958 PRIVATE ${ZLIB_ROOT_DIR}
1959 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1960)
1961
1962target_link_libraries(grpc_objective_c_plugin
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03001963 ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01001964 grpc_plugin_support
1965)
1966
1967
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03001968if (gRPC_INSTALL)
1969 install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets
1970 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1971 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1972 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1973 )
1974endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03001975
1976
Stanley Cheung857a1302016-09-29 17:26:29 -07001977add_executable(grpc_php_plugin
1978 src/compiler/php_plugin.cc
1979)
1980
1981target_include_directories(grpc_php_plugin
1982 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
1983 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
1984 PRIVATE ${BORINGSSL_ROOT_DIR}/include
1985 PRIVATE ${PROTOBUF_ROOT_DIR}/src
1986 PRIVATE ${ZLIB_ROOT_DIR}
1987 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
1988)
1989
1990target_link_libraries(grpc_php_plugin
1991 ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
1992 grpc_plugin_support
1993)
1994
1995
1996if (gRPC_INSTALL)
1997 install(TARGETS grpc_php_plugin EXPORT gRPCTargets
1998 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1999 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
2000 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
2001 )
2002endif()
2003
2004
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01002005add_executable(grpc_python_plugin
2006 src/compiler/python_plugin.cc
2007)
2008
2009target_include_directories(grpc_python_plugin
2010 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
2011 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
2012 PRIVATE ${BORINGSSL_ROOT_DIR}/include
2013 PRIVATE ${PROTOBUF_ROOT_DIR}/src
2014 PRIVATE ${ZLIB_ROOT_DIR}
2015 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
2016)
2017
2018target_link_libraries(grpc_python_plugin
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03002019 ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01002020 grpc_plugin_support
2021)
2022
2023
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03002024if (gRPC_INSTALL)
2025 install(TARGETS grpc_python_plugin EXPORT gRPCTargets
2026 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
2027 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
2028 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
2029 )
2030endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03002031
2032
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01002033add_executable(grpc_ruby_plugin
2034 src/compiler/ruby_plugin.cc
2035)
2036
2037target_include_directories(grpc_ruby_plugin
2038 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
2039 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
2040 PRIVATE ${BORINGSSL_ROOT_DIR}/include
2041 PRIVATE ${PROTOBUF_ROOT_DIR}/src
2042 PRIVATE ${ZLIB_ROOT_DIR}
2043 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
2044)
2045
2046target_link_libraries(grpc_ruby_plugin
Konstantin Podsvirov5baf7252016-07-27 16:25:37 +03002047 ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01002048 grpc_plugin_support
2049)
2050
2051
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03002052if (gRPC_INSTALL)
2053 install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets
2054 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
2055 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
2056 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
2057 )
2058endif()
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01002059
2060
Tamas Berghammerd798a7d2016-06-21 13:58:18 +01002061
2062
2063
Nicolas "Pixel" Noble2069fbc2016-08-18 23:29:56 +02002064
2065
2066
Arkadiy Shapkin40beb372016-08-17 14:42:36 +03002067if (gRPC_INSTALL)
2068 install(EXPORT gRPCTargets
2069 DESTINATION ${CMAKE_INSTALL_CMAKEDIR}
2070 NAMESPACE gRPC::
2071 )
2072endif()
Konstantin Podsvirovd2b88302016-07-27 23:43:47 +03002073
2074foreach(_config gRPCConfig gRPCConfigVersion)
2075 configure_file(tools/cmake/${_config}.cmake.in
2076 ${_config}.cmake @ONLY)
2077 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_config}.cmake
2078 DESTINATION ${CMAKE_INSTALL_CMAKEDIR}
2079 )
2080endforeach()