Skip to content

Commit a61392a

Browse files
committed
CMake: Create mbed-headers-ble library
Previously ble headers are part of mbed-headers-connectivity, this PR moves ble headers into new mbed-headers-ble to make ble stubs to be more self-contained and improves the composition of the library.
1 parent c703b0d commit a61392a

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

UNITTESTS/stubs/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
add_library(mbed-stubs-headers INTERFACE)
55
add_library(mbed-headers INTERFACE)
66
add_library(mbed-headers-base INTERFACE)
7-
add_library(mbed-headers-connectivity INTERFACE)
87

98
target_link_libraries(mbed-headers
109
INTERFACE
1110
mbed-headers-base
1211
mbed-headers-platform
13-
mbed-headers-connectivity
1412
mbed-headers-drivers
1513
mbed-headers-hal
1614
mbed-headers-events
@@ -28,12 +26,6 @@ target_include_directories(mbed-headers-base
2826
${mbed-os_SOURCE_DIR}/UNITTESTS/target_h/sys
2927
)
3028

31-
target_include_directories(mbed-headers-connectivity
32-
INTERFACE
33-
${mbed-os_SOURCE_DIR}/connectivity
34-
${mbed-os_SOURCE_DIR}/connectivity/FEATURE_BLE/include
35-
${mbed-os_SOURCE_DIR}/connectivity/FEATURE_BLE/include/ble
36-
)
3729

3830
target_include_directories(mbed-headers
3931
INTERFACE

connectivity/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ else()
4343
add_subdirectory(netsocket)
4444
add_subdirectory(mbedtls)
4545
add_subdirectory(libraries)
46+
add_subdirectory(FEATURE_BLE)
4647
endif()

connectivity/FEATURE_BLE/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
5+
add_subdirectory(tests/UNITTESTS)
6+
endif()
7+
48
add_subdirectory(libraries)
59
add_subdirectory(source)
610

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
add_subdirectory(doubles)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_library(mbed-headers-feature-ble INTERFACE)
5+
6+
target_include_directories(mbed-headers-feature-ble
7+
INTERFACE
8+
${mbed-os_SOURCE_DIR}/connectivity/FEATURE_BLE/include
9+
${mbed-os_SOURCE_DIR}/connectivity/FEATURE_BLE/include/ble
10+
)

0 commit comments

Comments
 (0)