set(SOURCES "wifidevnum_config.c"
            "mqttconf/mqttconf_commun.c"
            "drive/serial/serial.c"
            "drive/serial/serialota.c"
            "drive/gpiotrol/gpiocontrol.c"
            "drive/gpiotrol/betteryread.c"
            "hardware/rgb/ws2812_control.c"
            "hardware/lcd/lcd.c"
            "ota.c"
            "main.c")

set(INCLUDE_DIRS "." 
            "mqttconf" 
            "drive/serial"
            "drive/gpiotrol"
            "hardware/lcd"
            "hardware/rgb"
            )


idf_component_register(SRCS ${SOURCES}
                    INCLUDE_DIRS ${INCLUDE_DIRS}
                    REQUIRES 
                        driver 
                        esp_https_ota 
                        app_update 
                        nvs_flash 
                        esp_https_ota
                        esp_http_client
                        esp_http_server
                        spiffs
                        esp-tls        # <--- 替换掉刚才报错的 esp_crt_bundle
                        esp_netif
                        esp_event
                        esp_wifi
                        esp_adc
                        mqtt
                        json 
                        lvgl
                        esp_lcd
                    )

spiffs_create_partition_image(storage ../www FLASH_IN_PROJECT)


