 26c4d4b328
			
		
	
	26c4d4b328
	
	
	
		
			
			* Removed some compiler warnings, and cleaned out unnecessary warning suppression from CMake suppress_tinyusb_warnings() * Made explicit family_configure_dual_usb_example() for DUAL mode examples as family_configure_target() may not generally be called multiple times for the same target * Renamed library pico_pio_usb to tinyusb_picio_pio_usb to be clearer and avoid conflict if someone already has a pico_pio_usb in their project * Added family_add_pico_pio_usb() method for adding Pico-PIO_SUB support to an existing example * Allowed tinyusb_pico_pio_usb to be added to regular apps using the Pico SDK
		
			
				
	
	
		
			32 lines
		
	
	
		
			962 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			962 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| cmake_minimum_required(VERSION 3.5)
 | |
| 
 | |
| include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
 | |
| 
 | |
| # gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
 | |
| family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
 | |
| 
 | |
| project(${PROJECT})
 | |
| 
 | |
| # Checks this example is valid for the family and initializes the project
 | |
| family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
 | |
| 
 | |
| add_executable(${PROJECT})
 | |
| 
 | |
| # Example source
 | |
| target_sources(${PROJECT} PUBLIC
 | |
|         ${CMAKE_CURRENT_SOURCE_DIR}/src/hid_app.c
 | |
|         ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
 | |
|         )
 | |
| 
 | |
| # Example include
 | |
| target_include_directories(${PROJECT} PUBLIC
 | |
|         ${CMAKE_CURRENT_SOURCE_DIR}/src
 | |
|         )
 | |
| 
 | |
| # Configure compilation flags and libraries for the example... see the corresponding function
 | |
| # in hw/bsp/FAMILY/family.cmake for details.
 | |
| family_configure_host_example(${PROJECT})
 | |
| 
 | |
| # For rp2040, un-comment to enable pico-pio-usb
 | |
| # family_add_pico_pio_usb(${PROJECT})
 |