2021-09-02 09:25:34 -04:00
|
|
|
idf_build_get_property(idf_target IDF_TARGET)
|
|
|
|
|
2021-07-09 00:04:15 -04:00
|
|
|
idf_component_register(
|
|
|
|
INCLUDE_DIRS include
|
2021-09-02 09:25:34 -04:00
|
|
|
REQUIRES esp_phy
|
2021-07-09 00:04:15 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
if(CONFIG_IEEE802154_ENABLED)
|
2021-09-02 09:25:34 -04:00
|
|
|
idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB)
|
2022-12-29 22:56:53 -05:00
|
|
|
idf_component_get_property(esp_system_lib esp_system COMPONENT_LIB)
|
2022-06-29 03:43:08 -04:00
|
|
|
if($ENV{IEEE802154_LIB_FROM_INTERNAL_SRC})
|
2021-07-09 00:04:15 -04:00
|
|
|
idf_component_get_property(ieee802154_lib ieee802154_driver COMPONENT_LIB)
|
2021-10-19 04:06:13 -04:00
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${ieee802154_lib}>
|
2023-01-04 04:02:25 -05:00
|
|
|
$<TARGET_FILE:${esp_phy_lib}> libphy.a libbtbb.a $<TARGET_FILE:${esp_phy_lib}>)
|
2021-07-09 00:04:15 -04:00
|
|
|
else()
|
2022-10-19 03:57:24 -04:00
|
|
|
if(IDF_TARGET STREQUAL "esp32h4")
|
|
|
|
if(CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_1)
|
2022-04-20 03:38:06 -04:00
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE
|
2022-11-10 23:36:38 -05:00
|
|
|
"-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/rev1")
|
2022-04-20 03:38:06 -04:00
|
|
|
endif()
|
2022-10-19 03:57:24 -04:00
|
|
|
if(CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2)
|
2022-04-20 03:38:06 -04:00
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE
|
2022-11-10 23:36:38 -05:00
|
|
|
"-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/rev2")
|
2022-04-20 03:38:06 -04:00
|
|
|
endif()
|
|
|
|
else()
|
2022-08-28 11:07:49 -04:00
|
|
|
target_link_directories(${COMPONENT_LIB} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}")
|
2022-04-20 03:38:06 -04:00
|
|
|
endif()
|
2021-09-02 09:25:34 -04:00
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> lib802154.a libphy.a libbtbb.a
|
2022-12-29 22:56:53 -05:00
|
|
|
$<TARGET_FILE:${esp_phy_lib}> $<TARGET_FILE:${esp_system_lib}>)
|
2021-07-09 00:04:15 -04:00
|
|
|
endif()
|
|
|
|
endif()
|