2022-12-14 04:10:54 -05:00
|
|
|
idf_build_get_property(idf_target IDF_TARGET)
|
|
|
|
|
2023-08-28 02:02:08 -04:00
|
|
|
if(${idf_target} STREQUAL "linux")
|
|
|
|
return() # This component is not supported by the POSIX/Linux simulator
|
|
|
|
endif()
|
|
|
|
|
2023-02-14 08:20:55 -05:00
|
|
|
if(CONFIG_ESP_COEX_SW_COEXIST_ENABLE OR CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE)
|
2022-12-14 04:10:54 -05:00
|
|
|
if(CONFIG_APP_NO_BLOBS)
|
|
|
|
set(link_binary_libs 0)
|
|
|
|
set(ldfragments)
|
|
|
|
else()
|
|
|
|
set(link_binary_libs 1)
|
|
|
|
set(ldfragments "linker.lf")
|
|
|
|
endif()
|
2023-04-13 02:32:25 -04:00
|
|
|
set(srcs "src/coexist.c"
|
|
|
|
"${idf_target}/esp_coex_adapter.c")
|
2022-12-14 04:10:54 -05:00
|
|
|
endif()
|
|
|
|
|
2023-02-14 08:20:55 -05:00
|
|
|
if(CONFIG_ESP_WIFI_ENABLED)
|
2022-12-14 04:10:54 -05:00
|
|
|
list(APPEND srcs "${idf_target}/esp_coex_adapter.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "include"
|
2023-01-03 07:57:29 -05:00
|
|
|
PRIV_REQUIRES esp_timer driver esp_event
|
2022-12-14 04:10:54 -05:00
|
|
|
LDFRAGMENTS "${ldfragments}")
|
|
|
|
|
2023-02-14 08:20:55 -05:00
|
|
|
if(CONFIG_ESP_COEX_SW_COEXIST_ENABLE OR CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE)
|
2022-12-14 04:10:54 -05:00
|
|
|
idf_build_get_property(build_dir BUILD_DIR)
|
|
|
|
|
|
|
|
set(target_name "${idf_target}")
|
|
|
|
target_link_directories(${COMPONENT_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/lib/${target_name}")
|
|
|
|
|
|
|
|
if(link_binary_libs)
|
2023-02-14 08:20:55 -05:00
|
|
|
set(blob coexist)
|
2023-04-13 02:32:25 -04:00
|
|
|
add_prebuilt_library(${blob} "${CMAKE_CURRENT_SOURCE_DIR}/lib/${target_name}/lib${blob}.a"
|
2023-03-10 01:31:33 -05:00
|
|
|
REQUIRES ${COMPONENT_NAME})
|
2023-02-14 08:20:55 -05:00
|
|
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${blob})
|
2024-02-18 22:51:49 -05:00
|
|
|
if(CONFIG_IDF_TARGET_ESP32)
|
|
|
|
target_link_libraries(${COMPONENT_LIB} PRIVATE btdm_app)
|
|
|
|
endif()
|
2022-12-14 04:10:54 -05:00
|
|
|
endif()
|
|
|
|
|
|
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
|
|
|
endif()
|