# main component for esp32-p4-devkit-host-midi2.
#
# Pulls midi2cpp directly from ../../../../src (parent library, not
# vendored). The TinyUSB experiment/midi-coexistence branch is
# expected to live at ../external/tinyusb after running
# ./scripts/fetch_tinyusb.sh; the shim at ../components/tinyusb wires
# its host sources into the build.

set(MIDI2CPP_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../../../src")

idf_component_register(
    SRCS
        "main.cpp"
        "esp32_p4_devkit_host.cpp"
        "${MIDI2CPP_ROOT}/midi2_host.cpp"
    INCLUDE_DIRS
        "."
        "${MIDI2CPP_ROOT}"
    REQUIRES
        midi2
        tinyusb
        driver
        esp_timer
    PRIV_REQUIRES
        usb
)

target_compile_features(${COMPONENT_LIB} PUBLIC cxx_std_17)
