Skip to content

Commit 9d04bde

Browse files
committed
CMake: Make applications the top level CMake projects
So CMake can work correctly we need to define our project before we add dependencies, otherwise the project we depend on will be registered as the current project.
1 parent c7400b5 commit 9d04bde

File tree

11 files changed

+22
-22
lines changed

11 files changed

+22
-22
lines changed

BLE_Advertising/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_Advertising)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_GAP/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_GAP)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_GattClient_CharacteristicUpdates/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_GattClient_CharacteristicUpdates)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_GattClient_CharacteristicWrite/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_GattClient_CharacteristicWrite)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_GattServer_AddService/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_GattServer_AddService)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_GattServer_CharacteristicUpdates/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_GattServer_CharacteristicUpdates)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_GattServer_CharacteristicWrite/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_GattServer_CharacteristicWrite)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_GattServer_ExperimentalServices/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ set(APP_TARGET BLE_GattServer_ExperimentalServices)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
@@ -17,8 +19,6 @@ add_subdirectory(mbed-os-experimental-ble-services/services/LinkLoss)
1719

1820
add_executable(${APP_TARGET})
1921

20-
project(${APP_TARGET})
21-
2222
target_sources(${APP_TARGET}
2323
PRIVATE
2424
source/main.cpp

BLE_PeriodicAdvertising/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_PeriodicAdvertising)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_SecurityAndPrivacy/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET BLE_SecurityAndPrivacy)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_subdirectory(mbed-os-ble-utils)
1517

1618
add_executable(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PRIVATE
2222
./source

BLE_SupportedFeatures/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ set(APP_TARGET BLE_SupportedFeatures)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_executable(${APP_TARGET})
1517

16-
project(${APP_TARGET})
17-
1818
target_include_directories(${APP_TARGET}
1919
PRIVATE
2020
./source

0 commit comments

Comments
 (0)