set(APP_ASSETS_USE_EMBEDDED 1)

idf_component_register(
    SRCS
        "main.cpp"
        "apps/app_manager/app_manager.cpp"
        "apps/app_server/app_server.cpp"
        "hal/storage/hal_storage.cpp"
        "hal/ezdata/hal_ezdata.cpp"
        "hal/wifi/hal_wifi.cpp"
        "hal/hal.cpp"
        "apps/local_photo_slideshow/local_photo_slideshow.cpp"
        "apps/ezdata_photo_push/ezdata_photo_push.cpp"
        "hal/utils/image/image_utils.cpp"
        "hal/utils/audio/audio.cpp"
        "hal/utils/dns_server/dns_server.c"
    INCLUDE_DIRS
        "."
        "hal/utils/audio"
        "hal/utils/image"
        "hal/utils/dns_server"
    REQUIRES
        esp_http_server
        esp_wifi
        nvs_flash
        fatfs
        wear_levelling
        json
        esp_event
        esp_netif
        console
        M5Unified
        M5GFX
        tinyusb
        esp_http_client
        esp-tls
        json
        mqtt

)

target_compile_definitions(${COMPONENT_LIB} PRIVATE APP_ASSETS_USE_EMBEDDED=${APP_ASSETS_USE_EMBEDDED})
target_add_binary_data(${COMPONENT_LIB} "apps/app_server/index.html" TEXT)
target_add_binary_data(${COMPONENT_LIB} "assets/PaperColor.png" BINARY)
target_add_binary_data(${COMPONENT_LIB} "assets/arrowClickToPowerOn.png" BINARY)
