bugfix: Remove esp-partition in CMakeList for esp32s2 & esp32c3 chip

This commit is contained in:
xysun 2023-04-07 14:35:57 +08:00
parent aac5068e81
commit 60ae7ae369

View File

@ -118,25 +118,41 @@ elseif(${IDF_TARGET} STREQUAL "esp32s3")
"Please add a line(Name=model, Size>recommended size in log) to the partition file.") "Please add a line(Name=model, Size>recommended size in log) to the partition file.")
endif() endif()
elseif(${IDF_TARGET} STREQUAL "esp32s2") elseif(${IDF_TARGET} STREQUAL "esp32s2")
set(requires
spiffs
)
IF (IDF_VERSION_MAJOR GREATER 4)
list(APPEND requires esp_partition)
ENDIF (IDF_VERSION_MAJOR GREATER 4)
idf_component_register(SRCS . idf_component_register(SRCS .
INCLUDE_DIRS esp-tts/esp_tts_chinese/include INCLUDE_DIRS esp-tts/esp_tts_chinese/include
REQUIRES esp_partition REQUIRES ${requires}
PRIV_REQUIRES spi_flash) PRIV_REQUIRES spi_flash)
target_link_libraries(${COMPONENT_TARGET} INTERFACE "-L ${CMAKE_CURRENT_SOURCE_DIR}/esp-tts/esp_tts_chinese/esp32s2") target_link_libraries(${COMPONENT_TARGET} INTERFACE "-L ${CMAKE_CURRENT_SOURCE_DIR}/esp-tts/esp_tts_chinese/esp32s2")
target_link_libraries(${COMPONENT_TARGET} INTERFACE "-Wl,--start-group" target_link_libraries(${COMPONENT_TARGET} INTERFACE "-Wl,--start-group"
esp_tts_chinese esp_tts_chinese
voice_set_xiaole voice_set_xiaole
"-Wl,--end-group") "-Wl,--end-group")
elseif(${IDF_TARGET} STREQUAL "esp32c3") elseif(${IDF_TARGET} STREQUAL "esp32c3")
set(requires
spiffs
)
IF (IDF_VERSION_MAJOR GREATER 4)
list(APPEND requires esp_partition)
ENDIF (IDF_VERSION_MAJOR GREATER 4)
idf_component_register(SRCS . idf_component_register(SRCS .
INCLUDE_DIRS esp-tts/esp_tts_chinese/include INCLUDE_DIRS esp-tts/esp_tts_chinese/include
REQUIRES esp_partition REQUIRES ${requires}
PRIV_REQUIRES spi_flash) PRIV_REQUIRES spi_flash)
target_link_libraries(${COMPONENT_TARGET} INTERFACE "-L ${CMAKE_CURRENT_SOURCE_DIR}/esp-tts/esp_tts_chinese/esp32c3") target_link_libraries(${COMPONENT_TARGET} INTERFACE "-L ${CMAKE_CURRENT_SOURCE_DIR}/esp-tts/esp_tts_chinese/esp32c3")
target_link_libraries(${COMPONENT_TARGET} INTERFACE "-Wl,--start-group" target_link_libraries(${COMPONENT_TARGET} INTERFACE "-Wl,--start-group"
esp_tts_chinese esp_tts_chinese
voice_set_xiaole voice_set_xiaole
"-Wl,--end-group") "-Wl,--end-group")
endif() endif()