Fix build for devices with MESH as the default network type (#361)

pull/15530/head
Jamie Smith 2024-09-24 23:48:46 -07:00 committed by GitHub
parent 44ce17639c
commit f5417f7bed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 0 deletions

View File

@ -9,6 +9,9 @@ macro(create_mbed_802_15_4_target)
# Nanostack drivers always require Mbed RTOS
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags mbed-rtos-flags)
# For NanostackRfPhy.h
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-nanostack)
target_link_libraries(mbed-nanostack
INTERFACE
mbed-802.15.4-rf

View File

@ -34,8 +34,13 @@ target_link_libraries(mbed-nanostack-mbed_mesh_api
PUBLIC
mbed-nanostack-hal_mbed_cmsis_rtos
mbed-nanostack-sal_stack
mbed-nanostack
mbed-netsocket-api
mbed-core-flags
PRIVATE
mbed-rtos-flags
)
# Since there are a lot of circular references between this library and mbed-netsocket-api,
# we have to have CMake repeat the libraries on the link line multiple times.
set_property(TARGET mbed-nanostack-mbed_mesh_api PROPERTY LINK_INTERFACE_MULTIPLICITY 3)

View File

@ -69,6 +69,12 @@ if("MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=CELLULAR" IN_LIST MBED_CONFI
target_link_libraries(mbed-netsocket-api PUBLIC mbed-cellular)
endif()
# Similarly if mesh networking is used bring in that library
if("MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=MESH" IN_LIST MBED_CONFIG_DEFINITIONS)
target_link_libraries(mbed-netsocket-api PUBLIC mbed-nanostack-mbed_mesh_api)
endif()
if("DEVICE_EMAC=1" IN_LIST MBED_TARGET_DEFINITIONS)
target_link_libraries(mbed-netsocket-api
INTERFACE