CMake ble: move cordio add_library to own modules

pull/14427/head
Martin Kojtal 2021-03-08 09:40:31 +00:00
parent f931c00a2f
commit d45976a58d
3 changed files with 7 additions and 5 deletions

View File

@ -2,11 +2,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
add_library(mbed-ble OBJECT) 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(libraries)
add_subdirectory(source) add_subdirectory(source)

View File

@ -1,6 +1,10 @@
# Copyright (c) 2020 ARM Limited. All rights reserved. # Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # 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) if("CORDIO_LL" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_CORDIO_LL) add_subdirectory(TARGET_CORDIO_LL)
endif() endif()

View File

@ -1,6 +1,9 @@
# Copyright (c) 2020 ARM Limited. All rights reserved. # Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # 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 target_include_directories(mbed-ble-cordio-ll
INTERFACE INTERFACE
. .