From a297d2fd6c5f9c6276a94b0375db50a7c6984100 Mon Sep 17 00:00:00 2001 From: Rodrigo Reichert Date: Thu, 4 Jan 2024 11:01:32 +1100 Subject: [PATCH] ASIO C++ and ASIO Grpc libraries --- FindAsio.cmake | 23 +++++++++++++++++++++++ FindAsioGrpc.cmake | 19 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 FindAsio.cmake create mode 100644 FindAsioGrpc.cmake diff --git a/FindAsio.cmake b/FindAsio.cmake new file mode 100644 index 0000000..40b4743 --- /dev/null +++ b/FindAsio.cmake @@ -0,0 +1,23 @@ +# +# Copyright (C) 2023 Swift Navigation Inc. +# Contact: Swift Navigation +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. +# + +if(TARGET asio::asio) + return() +endif() + +add_library(asio_asio INTERFACE) +add_library(asio::asio ALIAS asio_asio) + +target_include_directories(asio_asio + SYSTEM INTERFACE + ${PROJECT_SOURCE_DIR}/third_party/asio/asio/include +) diff --git a/FindAsioGrpc.cmake b/FindAsioGrpc.cmake new file mode 100644 index 0000000..504993e --- /dev/null +++ b/FindAsioGrpc.cmake @@ -0,0 +1,19 @@ +# +# Copyright (C) 2023 Swift Navigation Inc. +# Contact: Swift Navigation +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. +# + +include("GenericFindDependency") + +GenericFindDependency( + TARGET asio-grpc::asio-grpc-standalone-asio + SOURCE_DIR asio-grpc + SYSTEM_INCLUDES +)