CMakeLists.txt 678 B

1234567891011121314151617181920212223242526272829303132
  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. adc_driver.hpp
  10. main.cpp
  11. )
  12. # Add pico_stdlib library which aggregates commonly used features
  13. target_link_libraries(${PROJECT_NAME}
  14. pico_stdlib
  15. hardware_i2c
  16. pico_i2c_slave
  17. hardware_spi
  18. hardware_adc
  19. hardware_irq
  20. pico_multicore
  21. )
  22. pico_enable_stdio_usb(${PROJECT_NAME} 1)
  23. pico_enable_stdio_uart(${PROJECT_NAME} 0)
  24. # create map/bin/hex/uf2 file in addition to ELF.
  25. pico_add_extra_outputs(${PROJECT_NAME})