Просмотр исходного кода

add driver dependency to IDF component

The esp32_port.c file uses the UART driver but does not add it to its
dependency. This cause build failures in some projects.
Jiacheng Guo 3 лет назад
Родитель
Сommit
c6f1920325
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      CMakeLists.txt

+ 2 - 1
CMakeLists.txt

@@ -13,7 +13,8 @@ if (DEFINED ESP_PLATFORM)
     if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "4.0")
     if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "4.0")
         idf_component_register(SRCS ${srcs}
         idf_component_register(SRCS ${srcs}
                                INCLUDE_DIRS include port
                                INCLUDE_DIRS include port
-                               PRIV_INCLUDE_DIRS private_include)
+                               PRIV_INCLUDE_DIRS private_include
+                               PRIV_REQUIRES driver)
         set(target ${COMPONENT_LIB})
         set(target ${COMPONENT_LIB})
         component_compile_options(-Wstrict-prototypes)
         component_compile_options(-Wstrict-prototypes)
     else()
     else()