mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-04 11:00:58 +02:00
change(esp_wifi): use add_prebuilt_library to add blobs
This commit is contained in:
@@ -88,13 +88,18 @@ if(CONFIG_ESP_WIFI_ENABLED OR CONFIG_ESP_HOST_WIFI_ENABLED)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Since some blob names are very generic, add an "esp_wifi_" prefix when creating target names,
|
||||||
|
# to avoid conflicts with other libraries.
|
||||||
|
set(blob_targets ${blobs})
|
||||||
|
list(TRANSFORM blob_targets PREPEND "esp_wifi_")
|
||||||
foreach(blob ${blobs})
|
foreach(blob ${blobs})
|
||||||
add_prebuilt_library(${blob} "${CMAKE_CURRENT_SOURCE_DIR}/lib/${target_name}/lib${blob}.a"
|
set(blob_target "esp_wifi_${blob}")
|
||||||
|
add_prebuilt_library(${blob_target} "${CMAKE_CURRENT_SOURCE_DIR}/lib/${target_name}/lib${blob}.a"
|
||||||
REQUIRES ${COMPONENT_NAME})
|
REQUIRES ${COMPONENT_NAME})
|
||||||
set(blob_reqs ${blobs})
|
set(blob_reqs ${blob_targets})
|
||||||
list(REMOVE_ITEM blob_reqs ${blob}) # remove itself from requirements
|
list(REMOVE_ITEM blob_reqs ${blob_target}) # remove itself from requirements
|
||||||
set_property(TARGET ${blob} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${blob_reqs})
|
set_property(TARGET ${blob_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${blob_reqs})
|
||||||
target_link_libraries(${COMPONENT_LIB} PUBLIC ${blob})
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${blob_target})
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
# TODO IDF-13365: remove the following lines
|
# TODO IDF-13365: remove the following lines
|
||||||
|
Reference in New Issue
Block a user