mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-04 07:55:21 +00:00
The loramac-node library definition will also be created by 'subsys/lorawan' for the LoRaWAN support. Hence, just add the source files if the previous declaration of the library is found else create a new one. Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
17 lines
681 B
CMake
17 lines
681 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# LoRa drivers depend on the include directories exposed by the loramac-node
|
|
# library. Hence, if it exists then the source files are added to that otherwise
|
|
# a library with same name is created.
|
|
if(TARGET loramac-node)
|
|
set(ZEPHYR_CURRENT_LIBRARY loramac-node)
|
|
else()
|
|
zephyr_library_named(loramac-node)
|
|
endif()
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_LORA_SHELL shell.c)
|
|
zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_RADIO_DRIVERS hal_common.c)
|
|
zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_RADIO_DRIVERS sx12xx_common.c)
|
|
zephyr_library_sources_ifdef(CONFIG_LORA_SX1276 sx1276.c)
|
|
zephyr_library_sources_ifdef(CONFIG_LORA_SX126X sx126x.c)
|