reform

MNT Reform: Open Source Portable Computer
Log (Feed) | Files | Refs (Tags) | README

CMakeLists.txt (1088B)


      1 cmake_minimum_required(VERSION 3.5)
      2 
      3 include(${CMAKE_CURRENT_SOURCE_DIR}/tinyusb/hw/bsp/family_support.cmake)
      4 
      5 # gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
      6 family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
      7 
      8 project(${PROJECT})
      9 
     10 # Checks this example is valid for the family and initializes the project
     11 family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
     12 
     13 add_executable(${PROJECT})
     14 
     15 # Example source
     16 target_sources(${PROJECT} PUBLIC
     17         ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
     18         ${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
     19         )
     20 
     21 # Example include
     22 target_include_directories(${PROJECT} PUBLIC
     23         ${CMAKE_CURRENT_SOURCE_DIR}/src
     24         )
     25 
     26 # Configure compilation flags and libraries for the example... see the corresponding function
     27 # in hw/bsp/FAMILY/family.cmake for details.
     28 family_configure_device_example(${PROJECT} noos)
     29 
     30 target_link_libraries(${PROJECT} PRIVATE pico_stdlib tinyusb_device tinyusb_board hardware_pwm hardware_i2c)
     31 
     32 target_compile_definitions(${PROJECT} PUBLIC
     33 	PICO_XOSC_STARTUP_DELAY_MULTIPLIER=64
     34   )