idf_component_register(SRCS
                            "main.c"
                            "bsp.c"
                            "ws2812.c"
                            "display/display_ssd1306_lvgl.c"
                            "display/matrix_5x7.c"
                            "API/Src/config_options.c"
                            "API/Src/utils.c"
                            "API/Src/examples/examples_info/example_info.c"
                            "API/Src/examples/shared_data/shared_functions.c"
                            "API/Src/MAC_802_15_4/mac_802_15_4.c"
                            "API/Src/MAC_802_15_8/mac_802_15_8.c"
                            "API/Src/examples/dstwr/dstwr.c"
                            "API/Src/examples/ex_00a_reading_dev_id/read_dev_id.c"
                            "API/Src/examples/ex_01a_simple_tx/simple_tx.c"
                            "API/Src/examples/ex_01b_tx_sleep/tx_sleep.c"
                            "API/Src/examples/ex_01b_tx_sleep/tx_sleep_idleRC.c"
                            "API/Src/examples/ex_01c_tx_sleep_auto/tx_sleep_auto.c"
                            "API/Src/examples/ex_01d_tx_timed_sleep/tx_timed_sleep.c"
                            "API/Src/examples/ex_01e_tx_with_cca/tx_with_cca.c"
                            "API/Src/examples/ex_01g_simple_tx_sts_sdc/simple_tx_sts_sdc.c"
                            "API/Src/examples/ex_01h_simple_tx_pdoa/simple_tx_pdoa.c"
                            "API/Src/examples/ex_01i_simple_tx_aes/simple_tx_aes.c"
                            "API/Src/examples/ex_01j_simple_tx_automotive/simple_tx_automotive.c"
                            "API/Src/examples/ex_02a_simple_rx/simple_rx.c"
                            "API/Src/examples/ex_02a_simple_rx/simple_rx_nlos.c"
                            "API/Src/examples/ex_02c_rx_diagnostics/rx_diagnostics.c"
                            "API/Src/examples/ex_02d_rx_sniff/rx_sniff.c"
                            "API/Src/examples/ex_02e_rx_dbl_buff/double_buffer_rx.c"
                            "API/Src/examples/ex_02f_rx_with_crystal_trim/rx_with_xtal_trim.c"
                            "API/Src/examples/ex_02g_simple_rx_sts_sdc/simple_rx_sts_sdc.c"
                            "API/Src/examples/ex_02h_simple_rx_pdoa/simple_rx_pdoa.c"
                            "API/Src/examples/ex_02i_simple_rx_aes/simple_rx_aes.c"
                            "API/Src/examples/ex_02j_rx_adc_capture/rx_adc_capture.c"
                            "API/Src/examples/ex_02k_simple_rx_cir/simple_rx_cir.c"
                            "API/Src/examples/ex_03a_tx_wait_resp/tx_wait_resp.c"
                            "API/Src/examples/ex_03b_rx_send_resp/rx_send_resp.c"
                            "API/Src/examples/ex_03d_tx_wait_resp_interrupts/tx_wait_resp_int.c"
                            "API/Src/examples/ex_04a_cont_wave/continuous_wave.c"
                            "API/Src/examples/ex_04b_cont_frame/continuous_frame.c"
                            "API/Src/examples/ex_05a_ds_twr_init/ds_twr_initiator.c"
                            "API/Src/examples/ex_05a_ds_twr_init/ds_twr_initiator_sts.c"
                            "API/Src/examples/ex_05b_ds_twr_resp/ds_twr_responder.c"
                            "API/Src/examples/ex_05b_ds_twr_resp/ds_twr_responder_sts.c"
                            "API/Src/examples/ex_05c_ds_twr_init_sts_sdc/ds_twr_sts_sdc_initiator.c"
                            "API/Src/examples/ex_05d_ds_twr_resp_sts_sdc/ds_twr_sts_sdc_responder.c"
                            "API/Src/examples/ex_06a_ss_twr_initiator/ss_twr_initiator.c"
                            "API/Src/examples/ex_06a_ss_twr_initiator/ss_twr_initiator_sts.c"
                            "API/Src/examples/ex_06a_ss_twr_initiator/ss_twr_initiator_sts_no_data.c"
                            "API/Src/examples/ex_06b_ss_twr_responder/ss_twr_responder.c"
                            "API/Src/examples/ex_06b_ss_twr_responder/ss_twr_responder_sts.c"
                            "API/Src/examples/ex_06b_ss_twr_responder/ss_twr_responder_sts_no_data.c"
                            "API/Src/examples/ex_06e_AES_ss_twr_initiator/ss_aes_twr_initiator.c"
                            "API/Src/examples/ex_06f_AES_ss_twr_responder/ss_aes_twr_responder.c"
                            "API/Src/examples/ex_07a_ack_data_tx/ack_data_tx.c"
                            "API/Src/examples/ex_07b_ack_data_rx/ack_data_rx.c"
                            "API/Src/examples/ex_11a_spi_crc/spi_crc.c"
                            "API/Src/examples/ex_13a_gpio/gpio_example.c"
                            "API/Src/examples/ex_14_otp_write/otp_write.c"
                            "API/Src/examples/ex_15_le_pend/le_pend_rx.c"
                            "API/Src/examples/ex_15_le_pend/le_pend_tx.c"
                            "API/Src/examples/ex_16_pll_cal/pll_cal.c"
                            "API/Src/examples/ex_17_bw_cal/bandwidth_calibration.c"
                            "API/Src/examples/ex_18_timer/timer_example.c"
                            "API/Src/examples/ex_19_tx_power_adjustment/tx_power_adjustment_example.c"
                            "API/Src/examples/ex_20_simple_aes/simple_aes.c"
                            "API/Src/examples/ex_21_linear_tx_power/linear_tx_power_example.c"
                    INCLUDE_DIRS "."
                    "common"
                    "display"
                    "API/Src"
                    "API/Src/examples"
                    "API/Src/examples/examples_info"
                    "API/Src/examples/shared_data"
                    "API/Src/MAC_802_15_4"
                    "API/Src/MAC_802_15_8"
                    REQUIRES esp_timer
                            # esp_wifi spi_flash json
                            driver
                            # fatfs spiffs nvs_flash
                            freertos log
                            # usb
                            esp_lcd lvgl decadriver libdeca
                            # mbedtls app_update
                            # espressif__esp_tinyusb-1.x espressif__tinyusb
                    )

target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

# fusion_12.bin -> fusion_12_font.c (must be after idf_component_register)
set(_fusion12_font_c "${CMAKE_CURRENT_BINARY_DIR}/fusion_12_font.c")
add_custom_command(
    OUTPUT "${_fusion12_font_c}"
    COMMAND python "${CMAKE_CURRENT_SOURCE_DIR}/display/bin2c.py"
            "${CMAKE_SOURCE_DIR}/font/fusion_12.bin"
            "${_fusion12_font_c}"
            fusion_12_font
    DEPENDS "${CMAKE_SOURCE_DIR}/font/fusion_12.bin"
            "${CMAKE_CURRENT_SOURCE_DIR}/display/bin2c.py"
    VERBATIM
)
target_sources(${COMPONENT_LIB} PRIVATE "${_fusion12_font_c}")
set_source_files_properties("${_fusion12_font_c}" PROPERTIES GENERATED TRUE)

