Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Feb 6, 2024
1 parent 4f247c9 commit 3e199dd
Showing 1 changed file with 31 additions and 11 deletions.
42 changes: 31 additions & 11 deletions connectivity/drivers/802.15.4_RF/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_library(mbed-802.15.4-rf STATIC EXCLUDE_FROM_ALL)
# The 'mbed-802.15.4-rf' target is lazily created because there might not be any subdirectories needing it at all.
macro(create_802_15_4_target)
if(NOT TARGET create_802_15_4_target)
add_library(mbed-802.15.4-rf STATIC EXCLUDE_FROM_ALL)

# Nanostack drivers always require Mbed RTOS
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags mbed-rtos-flags)

target_link_libraries(mbed-nanostack
INTERFACE
mbed-802.15.4-rf
)
endif()
endmacro()

# Nanostack drivers always require Mbed RTOS
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags mbed-rtos-flags)

if("Freescale" IN_LIST MBED_TARGET_LABELS)
create_802_15_4_target()
add_subdirectory(TARGET_Freescale)
add_subdirectory(mcr20a-rf-driver)
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
create_802_15_4_target()
add_subdirectory(TARGET_Silicon_Labs)
elseif("STM" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(stm-s2lp-rf-driver)
endif()

add_subdirectory(atmel-rf-driver)
if("COMPONENT_MICROCHIP_AT86RF=1" IN_LIST MBED_TARGET_DEFINITIONS)
create_802_15_4_target()
add_subdirectory(COMPONENT_MICROCHIP_AT86RF)
endif()

if("COMPONENT_NXP_MCR20A=1" IN_LIST MBED_TARGET_DEFINITIONS)
create_802_15_4_target()
add_subdirectory(COMPONENT_NXP_MCR20A)
endif()

if("COMPONENT_STM_S2_LP=1" IN_LIST MBED_TARGET_DEFINITIONS)
create_802_15_4_target()
add_subdirectory(COMPONENT_STM_S2_LP)
endif()


target_link_libraries(mbed-nanostack
INTERFACE
mbed-802.15.4-rf
)

0 comments on commit 3e199dd

Please sign in to comment.