From d45976a58d556b77412fc0435c1f6f446d14f935 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Mon, 8 Mar 2021 09:40:31 +0000 Subject: [PATCH] CMake ble: move cordio add_library to own modules --- connectivity/FEATURE_BLE/CMakeLists.txt | 5 ----- connectivity/FEATURE_BLE/libraries/CMakeLists.txt | 4 ++++ .../FEATURE_BLE/libraries/TARGET_CORDIO_LL/CMakeLists.txt | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/connectivity/FEATURE_BLE/CMakeLists.txt b/connectivity/FEATURE_BLE/CMakeLists.txt index a41598e788..91486fbd4a 100644 --- a/connectivity/FEATURE_BLE/CMakeLists.txt +++ b/connectivity/FEATURE_BLE/CMakeLists.txt @@ -2,11 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 add_library(mbed-ble OBJECT) -# cordio libraries are part of ble stack (_ll is optional) -# We use INTERFACE libraries to form the main object library otherwise we would -# get circular deps error between ble <-> cordio -add_library(mbed-ble-cordio INTERFACE) -add_library(mbed-ble-cordio-ll INTERFACE) add_subdirectory(libraries) add_subdirectory(source) diff --git a/connectivity/FEATURE_BLE/libraries/CMakeLists.txt b/connectivity/FEATURE_BLE/libraries/CMakeLists.txt index a68edcc4dd..90953778f0 100644 --- a/connectivity/FEATURE_BLE/libraries/CMakeLists.txt +++ b/connectivity/FEATURE_BLE/libraries/CMakeLists.txt @@ -1,6 +1,10 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# We use INTERFACE library to form the main object library otherwise we would +# get circular deps error between ble <-> cordio +add_library(mbed-ble-cordio INTERFACE) + if("CORDIO_LL" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_CORDIO_LL) endif() diff --git a/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/CMakeLists.txt b/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/CMakeLists.txt index d6e97333f1..3b20fcbb84 100644 --- a/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/CMakeLists.txt +++ b/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/CMakeLists.txt @@ -1,6 +1,9 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# INTERFACE library due to deps between ble <-> cordio-ll +add_library(mbed-ble-cordio-ll INTERFACE) + target_include_directories(mbed-ble-cordio-ll INTERFACE .