Skip to content

Commit

Permalink
change(tusb): Added cmake esp32p4 dep to esp_mm component
Browse files Browse the repository at this point in the history
  • Loading branch information
roma-jam committed Nov 15, 2024
1 parent ff2b72f commit c4ebf5d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
idf_build_get_property(target IDF_TARGET)

if(target STREQUAL "esp32s3")
if(${target} STREQUAL "esp32s3")
set(tusb_mcu "OPT_MCU_ESP32S3")
set(tusb_family "esp32sx")
elseif(target STREQUAL "esp32s2")
elseif(${target} STREQUAL "esp32s2")
set(tusb_mcu "OPT_MCU_ESP32S2")
set(tusb_family "esp32sx")
elseif(target STREQUAL "esp32p4")
elseif(${target} STREQUAL "esp32p4")
set(tusb_mcu "OPT_MCU_ESP32P4")
set(tusb_family "esp32px")
endif()
Expand Down Expand Up @@ -53,10 +53,20 @@ set(srcs
"src/tusb.c"
)

set(requirements_private
esp_netif # required by rndis_reports.c: #include "netif/ethernet.h"
)

if(${target} STREQUAL "esp32p4")
list(APPEND requirements_private
esp_mm # required by dcd_dwc2.c: #include "esp_cache.h"
)
endif()

idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes_public}
PRIV_INCLUDE_DIRS ${includes_private}
PRIV_REQUIRES esp_netif # required by rndis_reports.c: #include "netif/ethernet.h"
PRIV_REQUIRES ${requirements_private}
)

target_compile_options(${COMPONENT_LIB} PUBLIC ${compile_options})
Expand Down

0 comments on commit c4ebf5d

Please sign in to comment.