set(PROJECT hyperx_kb_rgb)
cmake_minimum_required(VERSION 3.13)
set(PICO_SDK_PATH /home/kenji/programming/pico/c/pico-sdk)
set(PICO_PIO_USB_PATH /home/kenji/programming/pico/c/Pico-PIO-USB)
include (${PICO_SDK_PATH}/external/pico_sdk_import.cmake)
project(${PROJECT} C CXX ASM)

pico_sdk_init()

add_subdirectory(${PICO_PIO_USB_PATH} pico_pio_usb)

add_executable(${PROJECT})
target_sources(${PROJECT} PRIVATE
	hyperx_elite2.c
	main.c
	usb_host.c
	usb_device.c
)

 # print memory usage, enable all warnings
target_link_options(${PROJECT} PRIVATE -Xlinker --print-memory-usage)
target_compile_options(${PROJECT} PRIVATE ) #-Wall -Wextra

# use tinyusb implementation
target_compile_definitions(${PROJECT} PRIVATE PIO_USB_USE_TINYUSB)

# needed so tinyusb can find tusb_config.h
target_include_directories(${PROJECT} PRIVATE ${CMAKE_CURRENT_LIST_DIR})

target_link_libraries(${PROJECT} PRIVATE
	pico_stdlib
	pico_pio_usb
	tinyusb_board
	tinyusb_device
	tinyusb_host
	tinyusb_pico_pio_usb
	hardware_adc
)

pico_add_extra_outputs(${PROJECT})

