46 lines
		
	
	
		
			931 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			931 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| cmake_minimum_required(VERSION 3.13)
 | |
| 
 | |
| include(pico_sdk_import.cmake)
 | |
| 
 | |
| project(Detection2023 C CXX ASM)
 | |
| set(CMAKE_C_STNDARD 11)
 | |
| set(CMAKE_CXX_STANDARD 17)
 | |
| 
 | |
| set(PICO_EXAMPLES_PATH ${PROJECT_SOURCE_DIR})
 | |
| 
 | |
| pico_sdk_init()
 | |
| 
 | |
| add_executable(Detection2023
 | |
|   main.c
 | |
|   i2c_slave.c
 | |
|   vl53l1_platform.c
 | |
|   VL53L1X_api.c
 | |
|   VL53L1X_calibration.c
 | |
|   VL53L1X_Fonctions.c
 | |
|   ws2812.c
 | |
|   SelectionCapteur.c
 | |
|   Tests.c
 | |
| )
 | |
| # generate the header file into the source tree as it is included in the RP2040 datasheet
 | |
| pico_generate_pio_header(Detection2023 ${CMAKE_CURRENT_LIST_DIR}/ws2812.pio)
 | |
| 
 | |
| 
 | |
| 
 | |
| target_link_libraries(Detection2023
 | |
|   hardware_i2c 
 | |
|   hardware_uart 
 | |
|   hardware_pio 
 | |
|   pico_stdlib
 | |
|   pico_multicore
 | |
| )
 | |
| 
 | |
| pico_enable_stdio_usb(Detection2023 1)
 | |
| pico_enable_stdio_uart(Detection2023 1)
 | |
| 
 | |
| pico_add_extra_outputs(Detection2023)
 | |
| 
 | |
| add_custom_target(Flash
 | |
|     DEPENDS Detection2023
 | |
|     COMMAND sudo picotool load -f ${PROJECT_BINARY_DIR}/Detection2023.uf2
 | |
| )
 |