CMakeLists.txt 662 B

12345678910111213141516171819202122232425262728293031
  1. cmake_minimum_required(VERSION 3.13)
  2. # initialize the SDK based on PICO_SDK_PATH
  3. # note: this must happen before project()
  4. include(pico_sdk_import.cmake)
  5. project(ADRS2040U_i2c)
  6. # initialize the Raspberry Pi Pico SDK
  7. pico_sdk_init()
  8. add_executable(${PROJECT_NAME}
  9. main.cpp
  10. )
  11. # Add pico_stdlib library which aggregates commonly used features
  12. target_link_libraries(${PROJECT_NAME}
  13. pico_stdlib
  14. hardware_i2c
  15. pico_i2c_slave
  16. hardware_spi
  17. hardware_adc
  18. hardware_irq
  19. pico_multicore
  20. )
  21. pico_enable_stdio_usb(${PROJECT_NAME} 1)
  22. pico_enable_stdio_uart(${PROJECT_NAME} 0)
  23. # create map/bin/hex/uf2 file in addition to ELF.
  24. pico_add_extra_outputs(${PROJECT_NAME})