From 311b2ca0c5162c5bb87d0517162eeb6353b198aa Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Mon, 20 Jul 2020 17:53:26 +0100 Subject: [PATCH] CMake: Add support for components dir --- components/BLE/CMakeLists.txt | 4 ++++ .../BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt | 7 +++++++ components/CMakeLists.txt | 6 ++++++ components/lora/CMakeLists.txt | 4 ++++ .../lora/COMPONENT_SX126X/CMakeLists.txt | 13 +++++++++++++ .../lora/COMPONENT_SX1272/CMakeLists.txt | 14 ++++++++++++++ .../lora/COMPONENT_SX1276/CMakeLists.txt | 14 ++++++++++++++ components/testing/CMakeLists.txt | 4 ++++ .../CMakeLists.txt | 18 ++++++++++++++++++ 9 files changed, 84 insertions(+) create mode 100644 components/BLE/CMakeLists.txt create mode 100644 components/BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt create mode 100644 components/CMakeLists.txt create mode 100644 components/lora/CMakeLists.txt create mode 100644 components/lora/COMPONENT_SX126X/CMakeLists.txt create mode 100644 components/lora/COMPONENT_SX1272/CMakeLists.txt create mode 100644 components/lora/COMPONENT_SX1276/CMakeLists.txt create mode 100644 components/testing/CMakeLists.txt create mode 100644 components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/CMakeLists.txt diff --git a/components/BLE/CMakeLists.txt b/components/BLE/CMakeLists.txt new file mode 100644 index 0000000000..c692f36c01 --- /dev/null +++ b/components/BLE/CMakeLists.txt @@ -0,0 +1,4 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +mbed_add_cmake_directory_if_labels("COMPONENT") diff --git a/components/BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt b/components/BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt new file mode 100644 index 0000000000..8b7653fd76 --- /dev/null +++ b/components/BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt @@ -0,0 +1,7 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-os + PRIVATE + BlueNrgMsHCIDriver.cpp +) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt new file mode 100644 index 0000000000..eacbf3ef3a --- /dev/null +++ b/components/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +add_subdirectory(BLE) +add_subdirectory(lora) +add_subdirectory(testing) diff --git a/components/lora/CMakeLists.txt b/components/lora/CMakeLists.txt new file mode 100644 index 0000000000..c692f36c01 --- /dev/null +++ b/components/lora/CMakeLists.txt @@ -0,0 +1,4 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +mbed_add_cmake_directory_if_labels("COMPONENT") diff --git a/components/lora/COMPONENT_SX126X/CMakeLists.txt b/components/lora/COMPONENT_SX126X/CMakeLists.txt new file mode 100644 index 0000000000..14b2783034 --- /dev/null +++ b/components/lora/COMPONENT_SX126X/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_sources(mbed-os + PRIVATE + SX126X_LoRaRadio.cpp +) diff --git a/components/lora/COMPONENT_SX1272/CMakeLists.txt b/components/lora/COMPONENT_SX1272/CMakeLists.txt new file mode 100644 index 0000000000..d37cfffb7a --- /dev/null +++ b/components/lora/COMPONENT_SX1272/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/registers +) + +target_sources(mbed-os + PRIVATE + SX1272_LoRaRadio.cpp +) diff --git a/components/lora/COMPONENT_SX1276/CMakeLists.txt b/components/lora/COMPONENT_SX1276/CMakeLists.txt new file mode 100644 index 0000000000..10dabb4d8e --- /dev/null +++ b/components/lora/COMPONENT_SX1276/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/registers +) + +target_sources(mbed-os + PRIVATE + SX1276_LoRaRadio.cpp +) diff --git a/components/testing/CMakeLists.txt b/components/testing/CMakeLists.txt new file mode 100644 index 0000000000..c692f36c01 --- /dev/null +++ b/components/testing/CMakeLists.txt @@ -0,0 +1,4 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +mbed_add_cmake_directory_if_labels("COMPONENT") diff --git a/components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/CMakeLists.txt b/components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/CMakeLists.txt new file mode 100644 index 0000000000..8aef22caae --- /dev/null +++ b/components/testing/COMPONENT_FPGA_CI_TEST_SHIELD/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-os + PRIVATE + DynamicPinList.cpp + I2CTester.cpp + MbedTester.cpp + SPIMasterTester.cpp + SPISlaveTester.cpp + SPITester.cpp + UARTTester.cpp +) + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +)