Skip to content

Commit f5113f7

Browse files
authored
ASIO C++ and ASIO Grpc libraries (#170)
# Changes Introduced the ability to include [ASIO C++](https://think-async.com/Asio/) as well as [ASIO gRPC](https://github.com/Tradias/asio-grpc) third party libraries. # Related Similar implementation with bazel swift-nav/rules_swiftnav#127
1 parent 954e6ce commit f5113f7

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

FindAsio.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright (C) 2023 Swift Navigation Inc.
3+
# Contact: Swift Navigation <[email protected]>
4+
#
5+
# This source is subject to the license found in the file 'LICENSE' which must
6+
# be be distributed together with this source. All other rights reserved.
7+
#
8+
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
9+
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
10+
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
11+
#
12+
13+
if(TARGET asio::asio)
14+
return()
15+
endif()
16+
17+
add_library(asio_asio INTERFACE)
18+
add_library(asio::asio ALIAS asio_asio)
19+
20+
target_include_directories(asio_asio
21+
SYSTEM INTERFACE
22+
${PROJECT_SOURCE_DIR}/third_party/asio/asio/include
23+
)

FindAsioGrpc.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (C) 2023 Swift Navigation Inc.
3+
# Contact: Swift Navigation <[email protected]>
4+
#
5+
# This source is subject to the license found in the file 'LICENSE' which must
6+
# be be distributed together with this source. All other rights reserved.
7+
#
8+
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
9+
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
10+
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
11+
#
12+
13+
include("GenericFindDependency")
14+
15+
GenericFindDependency(
16+
TARGET asio-grpc::asio-grpc-standalone-asio
17+
SOURCE_DIR asio-grpc
18+
SYSTEM_INCLUDES
19+
)

0 commit comments

Comments
 (0)