mirror of https://github.com/ARMmbed/mbed-os.git
CMake: Fix mbed-802.15.4-rf driver
mbed-nanostack should depend on mbed-802.15.4-rf to avoid a linker error with an undefined reference to `NanostackRfPhy::get_default_instance()`. The error occurs when `device_has: 802_15_4_PHY` is defined and the consumer depends on mbed-nanostack in their CMakeLists.txt. Previously we linked mbed-nanostack to mbed-802.15.4-rf, so mbed-802.15.4-rf's usage requirements weren't forwarded to consumers who depended on mbed-nanostack. With the previous configuration, the consumer would have to depend on mbed-802.15.4-rf directly to avoid an issue. This seems like a layering violation: it appears that mbed-nanostack is "the API" and mbed-802.15.4-rf is one of several possible implementations which are selected based on configuration macros. This commit changes the flow of dependencies so that mbed-nanostack ends up with the correct symbol definitions.pull/14546/head
parent
f4f8d8fd3f
commit
c7c2580f9e
|
@ -12,7 +12,7 @@ endif()
|
|||
|
||||
add_subdirectory(atmel-rf-driver)
|
||||
|
||||
target_link_libraries(mbed-802.15.4-rf
|
||||
target_link_libraries(mbed-nanostack
|
||||
INTERFACE
|
||||
mbed-nanostack
|
||||
mbed-802.15.4-rf
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue