mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #14427 from hugueskamba/hk_cmake_object_lorawan_refactor
CMake: Convert mbed-lorawan CMake library target to OBJECTfeature-cmake-object-libraries
commit
fd32ed0049
|
@ -2,7 +2,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_library(mbed-802.15.4-rf INTERFACE)
|
||||
add_library(mbed-lorawan INTERFACE)
|
||||
add_library(mbed-wifi INTERFACE)
|
||||
add_subdirectory(FEATURE_BLE EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(cellular EXCLUDE_FROM_ALL)
|
||||
|
|
|
@ -1,12 +1,24 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
add_library(mbed-lorawan-sx126x INTERFACE)
|
||||
|
||||
target_include_directories(mbed-lorawan-sx126x
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-lorawan
|
||||
target_sources(mbed-lorawan-sx126x
|
||||
INTERFACE
|
||||
SX126X_LoRaRadio.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mbed-lorawan
|
||||
PRIVATE
|
||||
mbed-lorawan-sx126x
|
||||
)
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
PUBLIC
|
||||
$<TARGET_PROPERTY:mbed-lorawan-sx126x,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
|
|
|
@ -1,13 +1,25 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
add_library(mbed-lorawan-sx1272 INTERFACE)
|
||||
|
||||
target_include_directories(mbed-lorawan-sx1272
|
||||
INTERFACE
|
||||
.
|
||||
./registers
|
||||
)
|
||||
|
||||
target_sources(mbed-lorawan
|
||||
target_sources(mbed-lorawan-sx1272
|
||||
INTERFACE
|
||||
SX1272_LoRaRadio.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mbed-lorawan
|
||||
PRIVATE
|
||||
mbed-lorawan-sx1272
|
||||
)
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
PUBLIC
|
||||
$<TARGET_PROPERTY:mbed-lorawan-sx1272,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
|
|
|
@ -1,13 +1,25 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
add_library(mbed-lorawan-sx1276 INTERFACE)
|
||||
|
||||
target_include_directories(mbed-lorawan-sx1276
|
||||
INTERFACE
|
||||
.
|
||||
./registers
|
||||
)
|
||||
|
||||
target_sources(mbed-lorawan
|
||||
target_sources(mbed-lorawan-sx1276
|
||||
INTERFACE
|
||||
SX1276_LoRaRadio.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mbed-lorawan
|
||||
PRIVATE
|
||||
mbed-lorawan-sx1276
|
||||
)
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
PUBLIC
|
||||
$<TARGET_PROPERTY:mbed-lorawan-sx1276,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
|
|
|
@ -1,12 +1,24 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
add_library(mbed-lorawan-stm32wl INTERFACE)
|
||||
|
||||
target_include_directories(mbed-lorawan-stm32wl
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-lorawan
|
||||
target_sources(mbed-lorawan-stm32wl
|
||||
INTERFACE
|
||||
STM32WL_LoRaRadio.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mbed-lorawan
|
||||
PRIVATE
|
||||
mbed-lorawan-stm32wl
|
||||
)
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
PUBLIC
|
||||
$<TARGET_PROPERTY:mbed-lorawan-stm32wl,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_library(mbed-lorawan OBJECT)
|
||||
|
||||
add_subdirectory(lorastack)
|
||||
add_subdirectory(system)
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
INTERFACE
|
||||
PUBLIC
|
||||
..
|
||||
.
|
||||
./include
|
||||
|
@ -13,18 +15,20 @@ target_include_directories(mbed-lorawan
|
|||
)
|
||||
|
||||
target_sources(mbed-lorawan
|
||||
INTERFACE
|
||||
PRIVATE
|
||||
source/LoRaWANInterface.cpp
|
||||
source/LoRaWANStack.cpp
|
||||
)
|
||||
|
||||
target_compile_definitions(mbed-lorawan
|
||||
INTERFACE
|
||||
PUBLIC
|
||||
MBED_CONF_LORAWAN_PRESENT=1
|
||||
)
|
||||
|
||||
target_link_libraries(mbed-lorawan
|
||||
INTERFACE
|
||||
PRIVATE
|
||||
mbed-core
|
||||
mbed-events
|
||||
PUBLIC
|
||||
mbed-mbedtls
|
||||
)
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
INTERFACE
|
||||
PUBLIC
|
||||
.
|
||||
./mac
|
||||
./phy
|
||||
)
|
||||
|
||||
target_sources(mbed-lorawan
|
||||
INTERFACE
|
||||
PRIVATE
|
||||
mac/LoRaMac.cpp
|
||||
mac/LoRaMacChannelPlan.cpp
|
||||
mac/LoRaMacCommand.cpp
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_sources(mbed-lorawan
|
||||
INTERFACE
|
||||
PRIVATE
|
||||
LoRaWANTimer.cpp
|
||||
)
|
||||
|
||||
target_include_directories(mbed-lorawan
|
||||
INTERFACE
|
||||
PUBLIC
|
||||
.
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue