From 129ec663789faa0b9fa0740bf8dbc0e881d11e70 Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Tue, 4 Feb 2025 16:00:12 +0000 Subject: [PATCH 1/3] Add support for configuring examples individually This adds the ability to configure examples individually, so you can either build all of pico examples, or you can just cd into a single example and build that. --- CMakeLists.txt | 99 ++++++++++--------- adc/adc_console/CMakeLists.txt | 8 ++ adc/dma_capture/CMakeLists.txt | 8 ++ adc/hello_adc/CMakeLists.txt | 8 ++ adc/joystick_display/CMakeLists.txt | 8 ++ adc/microphone_adc/CMakeLists.txt | 8 ++ adc/onboard_temperature/CMakeLists.txt | 8 ++ adc/read_vsys/CMakeLists.txt | 8 ++ binary_info/blink_any/CMakeLists.txt | 8 ++ binary_info/hello_anything/CMakeLists.txt | 8 ++ blink/CMakeLists.txt | 8 ++ blink_simple/CMakeLists.txt | 8 ++ bootloaders/encrypted/CMakeLists.txt | 8 ++ clocks/detached_clk_peri/CMakeLists.txt | 8 ++ clocks/hello_48MHz/CMakeLists.txt | 8 ++ clocks/hello_gpout/CMakeLists.txt | 8 ++ clocks/hello_resus/CMakeLists.txt | 8 ++ cmake/build_variants/CMakeLists.txt | 8 ++ dcp/hello_dcp/CMakeLists.txt | 8 ++ divider/CMakeLists.txt | 8 ++ dma/channel_irq/CMakeLists.txt | 8 ++ dma/control_blocks/CMakeLists.txt | 8 ++ dma/hello_dma/CMakeLists.txt | 8 ++ dma/sniff_crc/CMakeLists.txt | 8 ++ flash/cache_perfctr/CMakeLists.txt | 8 ++ flash/nuke/CMakeLists.txt | 8 ++ flash/program/CMakeLists.txt | 8 ++ .../runtime_flash_permissions/CMakeLists.txt | 8 ++ flash/ssi_dma/CMakeLists.txt | 8 ++ flash/xip_stream/CMakeLists.txt | 8 ++ freertos/hello_freertos/CMakeLists.txt | 8 ++ gpio/dht_sensor/CMakeLists.txt | 8 ++ gpio/hello_7segment/CMakeLists.txt | 8 ++ gpio/hello_gpio_irq/CMakeLists.txt | 8 ++ hello_world/serial/CMakeLists.txt | 8 ++ hello_world/usb/CMakeLists.txt | 8 ++ hstx/dvi_out_hstx_encoder/CMakeLists.txt | 8 ++ hstx/spi_lcd/CMakeLists.txt | 8 ++ i2c/bmp280_i2c/CMakeLists.txt | 8 ++ i2c/bus_scan/CMakeLists.txt | 8 ++ i2c/ht16k33_i2c/CMakeLists.txt | 8 ++ i2c/lcd_1602_i2c/CMakeLists.txt | 8 ++ i2c/lis3dh_i2c/CMakeLists.txt | 8 ++ i2c/mcp9808_i2c/CMakeLists.txt | 8 ++ i2c/mma8451_i2c/CMakeLists.txt | 8 ++ i2c/mpl3115a2_i2c/CMakeLists.txt | 8 ++ i2c/mpu6050_i2c/CMakeLists.txt | 8 ++ i2c/pa1010d_i2c/CMakeLists.txt | 8 ++ i2c/pcf8523_i2c/CMakeLists.txt | 8 ++ i2c/slave_mem_i2c/CMakeLists.txt | 8 ++ i2c/ssd1306_i2c/CMakeLists.txt | 8 ++ interp/hello_interp/CMakeLists.txt | 8 ++ multicore/hello_multicore/CMakeLists.txt | 8 ++ multicore/multicore_doorbell/CMakeLists.txt | 8 ++ multicore/multicore_fifo_irqs/CMakeLists.txt | 8 ++ multicore/multicore_runner/CMakeLists.txt | 8 ++ .../multicore_runner_queue/CMakeLists.txt | 8 ++ otp/hello_otp/CMakeLists.txt | 8 ++ pico_w/bt/CMakeLists.txt | 8 ++ pico_w/bt/standalone/CMakeLists.txt | 8 ++ pico_w/wifi/access_point/CMakeLists.txt | 8 ++ pico_w/wifi/blink/CMakeLists.txt | 8 ++ .../wifi/freertos/http_client/CMakeLists.txt | 8 ++ pico_w/wifi/freertos/httpd/CMakeLists.txt | 8 ++ pico_w/wifi/freertos/iperf/CMakeLists.txt | 8 ++ .../freertos/ntp_client_socket/CMakeLists.txt | 8 ++ pico_w/wifi/freertos/ping/CMakeLists.txt | 8 ++ pico_w/wifi/http_client/CMakeLists.txt | 8 ++ pico_w/wifi/httpd/CMakeLists.txt | 8 ++ pico_w/wifi/iperf/CMakeLists.txt | 8 ++ pico_w/wifi/ntp_client/CMakeLists.txt | 8 ++ pico_w/wifi/tcp_client/CMakeLists.txt | 8 ++ pico_w/wifi/tcp_server/CMakeLists.txt | 8 ++ pico_w/wifi/tls_client/CMakeLists.txt | 8 ++ pico_w/wifi/udp_beacon/CMakeLists.txt | 8 ++ pico_w/wifi/wifi_scan/CMakeLists.txt | 8 ++ picoboard/blinky/CMakeLists.txt | 8 ++ picoboard/button/CMakeLists.txt | 8 ++ pio/addition/CMakeLists.txt | 8 ++ pio/apa102/CMakeLists.txt | 8 ++ pio/clocked_input/CMakeLists.txt | 8 ++ pio/differential_manchester/CMakeLists.txt | 8 ++ pio/hello_pio/CMakeLists.txt | 8 ++ pio/hub75/CMakeLists.txt | 8 ++ pio/i2c/CMakeLists.txt | 8 ++ pio/ir_nec/ir_loopback/CMakeLists.txt | 8 ++ pio/logic_analyser/CMakeLists.txt | 8 ++ pio/manchester_encoding/CMakeLists.txt | 8 ++ pio/onewire/CMakeLists.txt | 8 ++ pio/pio_blink/CMakeLists.txt | 8 ++ pio/pwm/CMakeLists.txt | 8 ++ pio/quadrature_encoder/CMakeLists.txt | 8 ++ pio/quadrature_encoder_substep/CMakeLists.txt | 8 ++ pio/spi/CMakeLists.txt | 8 ++ pio/squarewave/CMakeLists.txt | 8 ++ pio/st7789_lcd/CMakeLists.txt | 8 ++ pio/uart_rx/CMakeLists.txt | 8 ++ pio/uart_tx/CMakeLists.txt | 8 ++ pio/ws2812/CMakeLists.txt | 8 ++ pwm/hello_pwm/CMakeLists.txt | 8 ++ pwm/led_fade/CMakeLists.txt | 8 ++ pwm/measure_duty_cycle/CMakeLists.txt | 8 ++ reset/hello_reset/CMakeLists.txt | 8 ++ rtc/hello_rtc/CMakeLists.txt | 8 ++ rtc/rtc_alarm/CMakeLists.txt | 8 ++ rtc/rtc_alarm_repeat/CMakeLists.txt | 8 ++ sha/mbedtls_sha256/CMakeLists.txt | 8 ++ sha/sha256/CMakeLists.txt | 8 ++ spi/bme280_spi/CMakeLists.txt | 8 ++ spi/max7219_32x8_spi/CMakeLists.txt | 8 ++ spi/max7219_8x7seg_spi/CMakeLists.txt | 8 ++ spi/mpu9250_spi/CMakeLists.txt | 8 ++ spi/spi_dma/CMakeLists.txt | 8 ++ spi/spi_flash/CMakeLists.txt | 8 ++ .../spi_master/CMakeLists.txt | 8 ++ spi/spi_master_slave/spi_slave/CMakeLists.txt | 8 ++ system/boot_info/CMakeLists.txt | 8 ++ system/hello_double_tap/CMakeLists.txt | 8 ++ system/narrow_io_write/CMakeLists.txt | 8 ++ system/rand/CMakeLists.txt | 8 ++ system/unique_board_id/CMakeLists.txt | 8 ++ timer/hello_timer/CMakeLists.txt | 8 ++ timer/periodic_sampler/CMakeLists.txt | 8 ++ timer/timer_lowlevel/CMakeLists.txt | 8 ++ uart/hello_uart/CMakeLists.txt | 8 ++ uart/lcd_uart/CMakeLists.txt | 8 ++ uart/uart_advanced/CMakeLists.txt | 8 ++ universal/hello_universal/CMakeLists.txt | 8 ++ usb/device/dev_hid_composite/CMakeLists.txt | 8 ++ usb/device/dev_lowlevel/CMakeLists.txt | 8 ++ usb/host/host_cdc_msc_hid/CMakeLists.txt | 8 ++ watchdog/hello_watchdog/CMakeLists.txt | 8 ++ 132 files changed, 1103 insertions(+), 44 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 597cb3e57..f154ba25d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,19 @@ cmake_minimum_required(VERSION 3.12) -# Pull in SDK (must be before project) -include(pico_sdk_import.cmake) -include(pico_extras_import_optional.cmake) +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_extras_import_optional.cmake) -project(pico_examples C CXX ASM) + pico_is_top_level_project(PICO_EXAMPLES_TOP_LEVEL_PROJECT) + + if (PICO_EXAMPLES_TOP_LEVEL_PROJECT) + project(pico_examples C CXX ASM) + else() + # Go back to individual example for project + return() + endif() +endif() set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) @@ -13,7 +22,7 @@ if (PICO_SDK_VERSION_STRING VERSION_LESS "2.1.0") message(FATAL_ERROR "Raspberry Pi Pico SDK version 2.1.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}") endif() -set(PICO_EXAMPLES_PATH ${PROJECT_SOURCE_DIR}) +set(PICO_EXAMPLES_PATH ${CMAKE_CURRENT_LIST_DIR}) # If you want debug output from USB (pass -DPICO_STDIO_USB=1) this ensures you don't lose any debug output while USB is set up if (NOT DEFINED PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS) @@ -23,7 +32,7 @@ endif() # Initialize the SDK pico_sdk_init() -include(example_auto_set_url.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/example_auto_set_url.cmake) function(add_subdirectory_exclude_platforms NAME) if (ARGN) @@ -42,13 +51,6 @@ function(add_subdirectory_exclude_platforms NAME) add_subdirectory(${NAME}) endfunction() -# Add blink example -add_subdirectory_exclude_platforms(blink) -add_subdirectory_exclude_platforms(blink_simple) - -# Add hello world example -add_subdirectory_exclude_platforms(hello_world) - add_compile_options(-Wall -Wno-format # int != int32_t as far as the compiler is concerned because gcc has int32_t as long int -Wno-unused-function # we have some for the docs that aren't called @@ -57,34 +59,43 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU") add_compile_options(-Wno-maybe-uninitialized) endif() -# Hardware-specific examples in subdirectories: -add_subdirectory(adc) -add_subdirectory(binary_info) -add_subdirectory(bootloaders) -add_subdirectory(clocks) -add_subdirectory(cmake) -add_subdirectory(dcp) -add_subdirectory(divider) -add_subdirectory(dma) -add_subdirectory(flash) -add_subdirectory(gpio) -add_subdirectory(hstx) -add_subdirectory(i2c) -add_subdirectory(interp) -add_subdirectory(multicore) -add_subdirectory(otp) -add_subdirectory(picoboard) -add_subdirectory(pico_w) -add_subdirectory(pio) -add_subdirectory(pwm) -add_subdirectory(reset) -add_subdirectory(rtc) -add_subdirectory(spi) -add_subdirectory(system) -add_subdirectory(timer) -add_subdirectory(uart) -add_subdirectory(universal) -add_subdirectory(usb) -add_subdirectory(watchdog) -add_subdirectory(sha) -add_subdirectory(freertos) +if (PICO_EXAMPLES_TOP_LEVEL_PROJECT) + # Add blink example + add_subdirectory_exclude_platforms(blink) + add_subdirectory_exclude_platforms(blink_simple) + + # Add hello world example + add_subdirectory_exclude_platforms(hello_world) + + # Hardware-specific examples in subdirectories: + add_subdirectory(adc) + add_subdirectory(binary_info) + add_subdirectory(bootloaders) + add_subdirectory(clocks) + add_subdirectory(cmake) + add_subdirectory(dcp) + add_subdirectory(divider) + add_subdirectory(dma) + add_subdirectory(flash) + add_subdirectory(gpio) + add_subdirectory(hstx) + add_subdirectory(i2c) + add_subdirectory(interp) + add_subdirectory(multicore) + add_subdirectory(otp) + add_subdirectory(picoboard) + add_subdirectory(pico_w) + add_subdirectory(pio) + add_subdirectory(pwm) + add_subdirectory(reset) + add_subdirectory(rtc) + add_subdirectory(spi) + add_subdirectory(system) + add_subdirectory(timer) + add_subdirectory(uart) + add_subdirectory(universal) + add_subdirectory(usb) + add_subdirectory(watchdog) + add_subdirectory(sha) + add_subdirectory(freertos) +endif() diff --git a/adc/adc_console/CMakeLists.txt b/adc/adc_console/CMakeLists.txt index 944a93d2d..cad5a27db 100644 --- a/adc/adc_console/CMakeLists.txt +++ b/adc/adc_console/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(adc_console C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(adc_console adc_console.c ) diff --git a/adc/dma_capture/CMakeLists.txt b/adc/dma_capture/CMakeLists.txt index ff965e9db..58573832b 100644 --- a/adc/dma_capture/CMakeLists.txt +++ b/adc/dma_capture/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(dma_capture C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(adc_dma_capture dma_capture.c ) diff --git a/adc/hello_adc/CMakeLists.txt b/adc/hello_adc/CMakeLists.txt index 186318246..47b898fe4 100644 --- a/adc/hello_adc/CMakeLists.txt +++ b/adc/hello_adc/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_adc C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_adc hello_adc.c ) diff --git a/adc/joystick_display/CMakeLists.txt b/adc/joystick_display/CMakeLists.txt index 96bb475ad..ff7aa37eb 100644 --- a/adc/joystick_display/CMakeLists.txt +++ b/adc/joystick_display/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(joystick_display C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(joystick_display joystick_display.c ) diff --git a/adc/microphone_adc/CMakeLists.txt b/adc/microphone_adc/CMakeLists.txt index 87f2c4029..6f7282515 100644 --- a/adc/microphone_adc/CMakeLists.txt +++ b/adc/microphone_adc/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(microphone_adc C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(microphone_adc microphone_adc.c ) diff --git a/adc/onboard_temperature/CMakeLists.txt b/adc/onboard_temperature/CMakeLists.txt index 1557ed234..464dd0c48 100644 --- a/adc/onboard_temperature/CMakeLists.txt +++ b/adc/onboard_temperature/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(onboard_temperature C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(onboard_temperature onboard_temperature.c) target_link_libraries(onboard_temperature pico_stdlib hardware_adc) diff --git a/adc/read_vsys/CMakeLists.txt b/adc/read_vsys/CMakeLists.txt index 67535bd72..404d701e2 100644 --- a/adc/read_vsys/CMakeLists.txt +++ b/adc/read_vsys/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(read_vsys C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_library(power_status_adc INTERFACE) target_sources(power_status_adc INTERFACE ${CMAKE_CURRENT_LIST_DIR}/power_status.c diff --git a/binary_info/blink_any/CMakeLists.txt b/binary_info/blink_any/CMakeLists.txt index de0401993..df21f0747 100644 --- a/binary_info/blink_any/CMakeLists.txt +++ b/binary_info/blink_any/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(blink_any C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (NOT PICO_CYW43_SUPPORTED) message("Only building blink_any for non W boards as PICO_CYW43_SUPPORTED is not set") endif() diff --git a/binary_info/hello_anything/CMakeLists.txt b/binary_info/hello_anything/CMakeLists.txt index 13aa84380..91d49f54b 100644 --- a/binary_info/hello_anything/CMakeLists.txt +++ b/binary_info/hello_anything/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_anything C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (TARGET tinyusb_device) add_executable(hello_anything hello_anything.c diff --git a/blink/CMakeLists.txt b/blink/CMakeLists.txt index 6308572d4..dba6bd516 100644 --- a/blink/CMakeLists.txt +++ b/blink/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../CMakeLists.txt) + project(blink C CXX ASM) + include(../CMakeLists.txt) +endif() + add_executable(blink blink.c ) diff --git a/blink_simple/CMakeLists.txt b/blink_simple/CMakeLists.txt index 0d7c0cb44..a26946099 100644 --- a/blink_simple/CMakeLists.txt +++ b/blink_simple/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../CMakeLists.txt) + project(blink_simple C CXX ASM) + include(../CMakeLists.txt) +endif() + add_executable(blink_simple blink_simple.c ) diff --git a/bootloaders/encrypted/CMakeLists.txt b/bootloaders/encrypted/CMakeLists.txt index f29f0efe2..ce4b8a4c8 100644 --- a/bootloaders/encrypted/CMakeLists.txt +++ b/bootloaders/encrypted/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(encrypted C CXX ASM) + include(../../CMakeLists.txt) +endif() + # Encrypted Bootloader add_executable(enc_bootloader enc_bootloader.c diff --git a/clocks/detached_clk_peri/CMakeLists.txt b/clocks/detached_clk_peri/CMakeLists.txt index d3dc75e01..1f5389af2 100644 --- a/clocks/detached_clk_peri/CMakeLists.txt +++ b/clocks/detached_clk_peri/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(detached_clk_peri C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(clocks_detached_clk_peri detached_clk_peri.c ) diff --git a/clocks/hello_48MHz/CMakeLists.txt b/clocks/hello_48MHz/CMakeLists.txt index 3ca96fc52..d51edd770 100644 --- a/clocks/hello_48MHz/CMakeLists.txt +++ b/clocks/hello_48MHz/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_48MHz C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_48MHz hello_48MHz.c ) diff --git a/clocks/hello_gpout/CMakeLists.txt b/clocks/hello_gpout/CMakeLists.txt index 057ec3c5f..36297bf0d 100644 --- a/clocks/hello_gpout/CMakeLists.txt +++ b/clocks/hello_gpout/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_gpout C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_gpout hello_gpout.c ) diff --git a/clocks/hello_resus/CMakeLists.txt b/clocks/hello_resus/CMakeLists.txt index 9d4522e94..57ab28f78 100644 --- a/clocks/hello_resus/CMakeLists.txt +++ b/clocks/hello_resus/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_resus C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_resus hello_resus.c ) diff --git a/cmake/build_variants/CMakeLists.txt b/cmake/build_variants/CMakeLists.txt index f40f80625..fb5b7132d 100644 --- a/cmake/build_variants/CMakeLists.txt +++ b/cmake/build_variants/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(build_variants C CXX ASM) + include(../../CMakeLists.txt) +endif() + # 1 Create an INTERFACE library aggregating all the common parts of the application add_library(common_stuff INTERFACE) diff --git a/dcp/hello_dcp/CMakeLists.txt b/dcp/hello_dcp/CMakeLists.txt index 2235fb271..6e5167bda 100644 --- a/dcp/hello_dcp/CMakeLists.txt +++ b/dcp/hello_dcp/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_dcp C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_dcp hello_dcp.c dcp_examples.S diff --git a/divider/CMakeLists.txt b/divider/CMakeLists.txt index d5ad0ac8e..fd6a44b7b 100644 --- a/divider/CMakeLists.txt +++ b/divider/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../CMakeLists.txt) + project(divider C CXX ASM) + include(../CMakeLists.txt) +endif() + if (TARGET hardware_divider) add_executable(hello_divider hello_divider.c diff --git a/dma/channel_irq/CMakeLists.txt b/dma/channel_irq/CMakeLists.txt index 25dc64e20..36b481fbf 100644 --- a/dma/channel_irq/CMakeLists.txt +++ b/dma/channel_irq/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(channel_irq C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(dma_channel_irq channel_irq.c ) diff --git a/dma/control_blocks/CMakeLists.txt b/dma/control_blocks/CMakeLists.txt index b551c7bfe..a39ccf5e4 100644 --- a/dma/control_blocks/CMakeLists.txt +++ b/dma/control_blocks/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(control_blocks C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(dma_control_blocks control_blocks.c ) diff --git a/dma/hello_dma/CMakeLists.txt b/dma/hello_dma/CMakeLists.txt index b513a2eb8..8950dbab5 100644 --- a/dma/hello_dma/CMakeLists.txt +++ b/dma/hello_dma/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_dma C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_dma hello_dma.c ) diff --git a/dma/sniff_crc/CMakeLists.txt b/dma/sniff_crc/CMakeLists.txt index 6f72b5100..8da26fa47 100644 --- a/dma/sniff_crc/CMakeLists.txt +++ b/dma/sniff_crc/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(sniff_crc C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(sniff_crc sniff_crc.c ) diff --git a/flash/cache_perfctr/CMakeLists.txt b/flash/cache_perfctr/CMakeLists.txt index 2d065a28e..ab18b694e 100644 --- a/flash/cache_perfctr/CMakeLists.txt +++ b/flash/cache_perfctr/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(cache_perfctr C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(flash_cache_perfctr flash_cache_perfctr.c ) diff --git a/flash/nuke/CMakeLists.txt b/flash/nuke/CMakeLists.txt index c8ae47a94..0c84368de 100644 --- a/flash/nuke/CMakeLists.txt +++ b/flash/nuke/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(nuke C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(flash_nuke nuke.c ) diff --git a/flash/program/CMakeLists.txt b/flash/program/CMakeLists.txt index a17bb0ec0..00b7e41c4 100644 --- a/flash/program/CMakeLists.txt +++ b/flash/program/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(program C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(flash_program flash_program.c ) diff --git a/flash/runtime_flash_permissions/CMakeLists.txt b/flash/runtime_flash_permissions/CMakeLists.txt index 3eb6bdd94..1b27ff336 100644 --- a/flash/runtime_flash_permissions/CMakeLists.txt +++ b/flash/runtime_flash_permissions/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(runtime_flash_permissions C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(runtime_flash_permissions runtime_flash_permissions.c ) diff --git a/flash/ssi_dma/CMakeLists.txt b/flash/ssi_dma/CMakeLists.txt index 965cc6098..c2d3d98d7 100644 --- a/flash/ssi_dma/CMakeLists.txt +++ b/flash/ssi_dma/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(ssi_dma C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(flash_ssi_dma flash_ssi_dma.c ) diff --git a/flash/xip_stream/CMakeLists.txt b/flash/xip_stream/CMakeLists.txt index bd8b6dd03..ff7e5b6d2 100644 --- a/flash/xip_stream/CMakeLists.txt +++ b/flash/xip_stream/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(xip_stream C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(flash_xip_stream flash_xip_stream.c ) diff --git a/freertos/hello_freertos/CMakeLists.txt b/freertos/hello_freertos/CMakeLists.txt index 1da0ce773..d1f7e556a 100644 --- a/freertos/hello_freertos/CMakeLists.txt +++ b/freertos/hello_freertos/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_freertos C CXX ASM) + include(../../CMakeLists.txt) +endif() + set(TARGET_NAME hello_freertos1) add_executable(${TARGET_NAME} hello_freertos.c diff --git a/gpio/dht_sensor/CMakeLists.txt b/gpio/dht_sensor/CMakeLists.txt index 33c72ea99..302469cfd 100644 --- a/gpio/dht_sensor/CMakeLists.txt +++ b/gpio/dht_sensor/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(dht_sensor C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(dht dht.c ) diff --git a/gpio/hello_7segment/CMakeLists.txt b/gpio/hello_7segment/CMakeLists.txt index d0ce3aecf..e24fd9d70 100644 --- a/gpio/hello_7segment/CMakeLists.txt +++ b/gpio/hello_7segment/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_7segment C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_7segment hello_7segment.c ) diff --git a/gpio/hello_gpio_irq/CMakeLists.txt b/gpio/hello_gpio_irq/CMakeLists.txt index e514cfbea..5bd7ffe16 100644 --- a/gpio/hello_gpio_irq/CMakeLists.txt +++ b/gpio/hello_gpio_irq/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_gpio_irq C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_gpio_irq hello_gpio_irq.c ) diff --git a/hello_world/serial/CMakeLists.txt b/hello_world/serial/CMakeLists.txt index 7be690122..ca99bd5a2 100644 --- a/hello_world/serial/CMakeLists.txt +++ b/hello_world/serial/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(serial C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_serial hello_serial.c ) diff --git a/hello_world/usb/CMakeLists.txt b/hello_world/usb/CMakeLists.txt index aa176eb93..3a0c43126 100644 --- a/hello_world/usb/CMakeLists.txt +++ b/hello_world/usb/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(usb C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (TARGET tinyusb_device) add_executable(hello_usb hello_usb.c diff --git a/hstx/dvi_out_hstx_encoder/CMakeLists.txt b/hstx/dvi_out_hstx_encoder/CMakeLists.txt index 4c9b3a345..a6875b455 100644 --- a/hstx/dvi_out_hstx_encoder/CMakeLists.txt +++ b/hstx/dvi_out_hstx_encoder/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(dvi_out_hstx_encoder C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(dvi_out_hstx_encoder dvi_out_hstx_encoder.c ) diff --git a/hstx/spi_lcd/CMakeLists.txt b/hstx/spi_lcd/CMakeLists.txt index 7d8551ac0..5f76b5330 100644 --- a/hstx/spi_lcd/CMakeLists.txt +++ b/hstx/spi_lcd/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(spi_lcd C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hstx_spi_lcd hstx_spi_lcd.c ) diff --git a/i2c/bmp280_i2c/CMakeLists.txt b/i2c/bmp280_i2c/CMakeLists.txt index c63a7baba..4ac64f2b8 100644 --- a/i2c/bmp280_i2c/CMakeLists.txt +++ b/i2c/bmp280_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(bmp280_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(bmp280_i2c bmp280_i2c.c ) diff --git a/i2c/bus_scan/CMakeLists.txt b/i2c/bus_scan/CMakeLists.txt index 662cfe61b..a808e0a34 100644 --- a/i2c/bus_scan/CMakeLists.txt +++ b/i2c/bus_scan/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(bus_scan C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(i2c_bus_scan bus_scan.c ) diff --git a/i2c/ht16k33_i2c/CMakeLists.txt b/i2c/ht16k33_i2c/CMakeLists.txt index b9b1110fb..567bdebab 100644 --- a/i2c/ht16k33_i2c/CMakeLists.txt +++ b/i2c/ht16k33_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(ht16k33_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(ht16k33_i2c ht16k33_i2c.c ) diff --git a/i2c/lcd_1602_i2c/CMakeLists.txt b/i2c/lcd_1602_i2c/CMakeLists.txt index c6aad7ae1..5a2f0318c 100644 --- a/i2c/lcd_1602_i2c/CMakeLists.txt +++ b/i2c/lcd_1602_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(lcd_1602_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(lcd_1602_i2c lcd_1602_i2c.c ) diff --git a/i2c/lis3dh_i2c/CMakeLists.txt b/i2c/lis3dh_i2c/CMakeLists.txt index 0b23c9043..b60d4d5d4 100644 --- a/i2c/lis3dh_i2c/CMakeLists.txt +++ b/i2c/lis3dh_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(lis3dh_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(lis3dh_i2c lis3dh_i2c.c ) diff --git a/i2c/mcp9808_i2c/CMakeLists.txt b/i2c/mcp9808_i2c/CMakeLists.txt index 4ee1b4975..754c4226c 100644 --- a/i2c/mcp9808_i2c/CMakeLists.txt +++ b/i2c/mcp9808_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(mcp9808_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(mcp9808_i2c mcp9808_i2c.c ) diff --git a/i2c/mma8451_i2c/CMakeLists.txt b/i2c/mma8451_i2c/CMakeLists.txt index e3c1084d1..e570d9567 100644 --- a/i2c/mma8451_i2c/CMakeLists.txt +++ b/i2c/mma8451_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(mma8451_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(mma8451_i2c mma8451_i2c.c ) diff --git a/i2c/mpl3115a2_i2c/CMakeLists.txt b/i2c/mpl3115a2_i2c/CMakeLists.txt index db9a5d7b6..62a54af2a 100644 --- a/i2c/mpl3115a2_i2c/CMakeLists.txt +++ b/i2c/mpl3115a2_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(mpl3115a2_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(mpl3115a2_i2c mpl3115a2_i2c.c ) diff --git a/i2c/mpu6050_i2c/CMakeLists.txt b/i2c/mpu6050_i2c/CMakeLists.txt index 83be3d51e..0f981b1b6 100644 --- a/i2c/mpu6050_i2c/CMakeLists.txt +++ b/i2c/mpu6050_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(mpu6050_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(mpu6050_i2c mpu6050_i2c.c ) diff --git a/i2c/pa1010d_i2c/CMakeLists.txt b/i2c/pa1010d_i2c/CMakeLists.txt index b04fac23f..60e6555b0 100644 --- a/i2c/pa1010d_i2c/CMakeLists.txt +++ b/i2c/pa1010d_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(pa1010d_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pa1010d_i2c pa1010d_i2c.c ) diff --git a/i2c/pcf8523_i2c/CMakeLists.txt b/i2c/pcf8523_i2c/CMakeLists.txt index 8d47635b3..4279fa82f 100644 --- a/i2c/pcf8523_i2c/CMakeLists.txt +++ b/i2c/pcf8523_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(pcf8523_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pcf8523_i2c pcf8523_i2c.c ) diff --git a/i2c/slave_mem_i2c/CMakeLists.txt b/i2c/slave_mem_i2c/CMakeLists.txt index 449744447..c8ea02cb1 100644 --- a/i2c/slave_mem_i2c/CMakeLists.txt +++ b/i2c/slave_mem_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(slave_mem_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(slave_mem_i2c slave_mem_i2c.c ) diff --git a/i2c/ssd1306_i2c/CMakeLists.txt b/i2c/ssd1306_i2c/CMakeLists.txt index 25fabace1..fde9d06d5 100644 --- a/i2c/ssd1306_i2c/CMakeLists.txt +++ b/i2c/ssd1306_i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(ssd1306_i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(ssd1306_i2c ssd1306_i2c.c ) diff --git a/interp/hello_interp/CMakeLists.txt b/interp/hello_interp/CMakeLists.txt index 05b176da7..5eff3426b 100644 --- a/interp/hello_interp/CMakeLists.txt +++ b/interp/hello_interp/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_interp C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (TARGET hardware_interp) add_executable(hello_interp hello_interp.c diff --git a/multicore/hello_multicore/CMakeLists.txt b/multicore/hello_multicore/CMakeLists.txt index 540d67948..a124eb5b1 100644 --- a/multicore/hello_multicore/CMakeLists.txt +++ b/multicore/hello_multicore/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_multicore C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_multicore multicore.c ) diff --git a/multicore/multicore_doorbell/CMakeLists.txt b/multicore/multicore_doorbell/CMakeLists.txt index 8e2493e18..5f3147cbd 100644 --- a/multicore/multicore_doorbell/CMakeLists.txt +++ b/multicore/multicore_doorbell/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(multicore_doorbell C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(multicore_doorbell multicore_doorbell.c ) diff --git a/multicore/multicore_fifo_irqs/CMakeLists.txt b/multicore/multicore_fifo_irqs/CMakeLists.txt index aa1097e14..fc2d1e22b 100644 --- a/multicore/multicore_fifo_irqs/CMakeLists.txt +++ b/multicore/multicore_fifo_irqs/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(multicore_fifo_irqs C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(multicore_fifo_irqs multicore_fifo_irqs.c ) diff --git a/multicore/multicore_runner/CMakeLists.txt b/multicore/multicore_runner/CMakeLists.txt index a96db31e0..d36df9010 100644 --- a/multicore/multicore_runner/CMakeLists.txt +++ b/multicore/multicore_runner/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(multicore_runner C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(multicore_runner multicore_runner.c ) diff --git a/multicore/multicore_runner_queue/CMakeLists.txt b/multicore/multicore_runner_queue/CMakeLists.txt index c35368a78..cde9bcfb3 100644 --- a/multicore/multicore_runner_queue/CMakeLists.txt +++ b/multicore/multicore_runner_queue/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(multicore_runner_queue C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(multicore_runner_queue multicore_runner_queue.c ) diff --git a/otp/hello_otp/CMakeLists.txt b/otp/hello_otp/CMakeLists.txt index 43397cd3e..b52be6a81 100644 --- a/otp/hello_otp/CMakeLists.txt +++ b/otp/hello_otp/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_otp C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_otp hello_otp.c ) diff --git a/pico_w/bt/CMakeLists.txt b/pico_w/bt/CMakeLists.txt index e14345398..954080892 100644 --- a/pico_w/bt/CMakeLists.txt +++ b/pico_w/bt/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(bt C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_subdirectory(standalone) set(BTSTACK_ROOT ${PICO_SDK_PATH}/lib/btstack) diff --git a/pico_w/bt/standalone/CMakeLists.txt b/pico_w/bt/standalone/CMakeLists.txt index 28d20b687..87f278362 100644 --- a/pico_w/bt/standalone/CMakeLists.txt +++ b/pico_w/bt/standalone/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(standalone C CXX ASM) + include(../../../CMakeLists.txt) +endif() + # Standalone example that reads from the on board temperature sensor and sends notifications via BLE # Flashes slowly each second to show it's running add_executable(picow_ble_temp_sensor diff --git a/pico_w/wifi/access_point/CMakeLists.txt b/pico_w/wifi/access_point/CMakeLists.txt index 6bc0a2eb4..77d1676ce 100644 --- a/pico_w/wifi/access_point/CMakeLists.txt +++ b/pico_w/wifi/access_point/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(access_point C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(picow_access_point_background picow_access_point.c dhcpserver/dhcpserver.c diff --git a/pico_w/wifi/blink/CMakeLists.txt b/pico_w/wifi/blink/CMakeLists.txt index 2b1e6bfd3..60661477e 100644 --- a/pico_w/wifi/blink/CMakeLists.txt +++ b/pico_w/wifi/blink/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(blink C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(picow_blink picow_blink.c ) diff --git a/pico_w/wifi/freertos/http_client/CMakeLists.txt b/pico_w/wifi/freertos/http_client/CMakeLists.txt index 2010621a9..aa18264dc 100644 --- a/pico_w/wifi/freertos/http_client/CMakeLists.txt +++ b/pico_w/wifi/freertos/http_client/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../../CMakeLists.txt) + project(http_client C CXX ASM) + include(../../../../CMakeLists.txt) +endif() + # This example is disabled as mbedtls uses too much stack, and Freertos SMP is problematic with # pico_cyw43_arch_lwip_threadsafe_background (nosys), where WiFi and LwIP activity is performed in an IRQ. # Prefer to use pico_cyw43_arch_lwip_sys_freertos instead, where WiFi and LwIP activity is performed in a thread. diff --git a/pico_w/wifi/freertos/httpd/CMakeLists.txt b/pico_w/wifi/freertos/httpd/CMakeLists.txt index 35dd4eb35..2f34f4362 100644 --- a/pico_w/wifi/freertos/httpd/CMakeLists.txt +++ b/pico_w/wifi/freertos/httpd/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../../CMakeLists.txt) + project(httpd C CXX ASM) + include(../../../../CMakeLists.txt) +endif() + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) add_executable(pico_freertos_httpd_nosys diff --git a/pico_w/wifi/freertos/iperf/CMakeLists.txt b/pico_w/wifi/freertos/iperf/CMakeLists.txt index 2cc17c560..7e4259de5 100644 --- a/pico_w/wifi/freertos/iperf/CMakeLists.txt +++ b/pico_w/wifi/freertos/iperf/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../../CMakeLists.txt) + project(iperf C CXX ASM) + include(../../../../CMakeLists.txt) +endif() + add_executable(picow_freertos_iperf_server_nosys picow_freertos_iperf.c ) diff --git a/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt b/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt index 3cb02d5f1..5a0a0a394 100644 --- a/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt +++ b/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../../CMakeLists.txt) + project(ntp_client_socket C CXX ASM) + include(../../../../CMakeLists.txt) +endif() + add_executable(picow_freertos_ntp_client_socket picow_freertos_ntp_client_socket.c ) diff --git a/pico_w/wifi/freertos/ping/CMakeLists.txt b/pico_w/wifi/freertos/ping/CMakeLists.txt index 1296e09bf..debcdba16 100644 --- a/pico_w/wifi/freertos/ping/CMakeLists.txt +++ b/pico_w/wifi/freertos/ping/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../../CMakeLists.txt) + project(ping C CXX ASM) + include(../../../../CMakeLists.txt) +endif() + if (EXISTS ${PICO_LWIP_CONTRIB_PATH}/apps/ping/ping.c) add_executable(picow_freertos_ping_nosys picow_freertos_ping.c diff --git a/pico_w/wifi/http_client/CMakeLists.txt b/pico_w/wifi/http_client/CMakeLists.txt index a1be39398..50f73f36c 100644 --- a/pico_w/wifi/http_client/CMakeLists.txt +++ b/pico_w/wifi/http_client/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(http_client C CXX ASM) + include(../../../CMakeLists.txt) +endif() + pico_add_library(example_lwip_http_util NOFLAG) target_sources(example_lwip_http_util INTERFACE ${CMAKE_CURRENT_LIST_DIR}/example_http_client_util.c diff --git a/pico_w/wifi/httpd/CMakeLists.txt b/pico_w/wifi/httpd/CMakeLists.txt index f028ef6dd..4c4401114 100644 --- a/pico_w/wifi/httpd/CMakeLists.txt +++ b/pico_w/wifi/httpd/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(httpd C CXX ASM) + include(../../../CMakeLists.txt) +endif() + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) add_executable(picow_httpd_background diff --git a/pico_w/wifi/iperf/CMakeLists.txt b/pico_w/wifi/iperf/CMakeLists.txt index 56a6a1b0a..bc1f86b89 100644 --- a/pico_w/wifi/iperf/CMakeLists.txt +++ b/pico_w/wifi/iperf/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(iperf C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(picow_iperf_server_background picow_iperf.c ) diff --git a/pico_w/wifi/ntp_client/CMakeLists.txt b/pico_w/wifi/ntp_client/CMakeLists.txt index 22a2e6354..0067a6be7 100644 --- a/pico_w/wifi/ntp_client/CMakeLists.txt +++ b/pico_w/wifi/ntp_client/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(ntp_client C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(picow_ntp_client_background picow_ntp_client.c ) diff --git a/pico_w/wifi/tcp_client/CMakeLists.txt b/pico_w/wifi/tcp_client/CMakeLists.txt index 0bb498a5c..cc4bec906 100644 --- a/pico_w/wifi/tcp_client/CMakeLists.txt +++ b/pico_w/wifi/tcp_client/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(tcp_client C CXX ASM) + include(../../../CMakeLists.txt) +endif() + if (NOT TEST_TCP_SERVER_IP) message("Skipping tcp_client example as TEST_TCP_SERVER_IP is not defined") else() diff --git a/pico_w/wifi/tcp_server/CMakeLists.txt b/pico_w/wifi/tcp_server/CMakeLists.txt index 3e8a48471..b90e192f4 100644 --- a/pico_w/wifi/tcp_server/CMakeLists.txt +++ b/pico_w/wifi/tcp_server/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(tcp_server C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(picow_tcpip_server_background picow_tcp_server.c ) diff --git a/pico_w/wifi/tls_client/CMakeLists.txt b/pico_w/wifi/tls_client/CMakeLists.txt index fdbe6c056..9f65fffe7 100644 --- a/pico_w/wifi/tls_client/CMakeLists.txt +++ b/pico_w/wifi/tls_client/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(tls_client C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(picow_tls_client_background picow_tls_client.c tls_common.c diff --git a/pico_w/wifi/udp_beacon/CMakeLists.txt b/pico_w/wifi/udp_beacon/CMakeLists.txt index 59300eee4..5fc913943 100644 --- a/pico_w/wifi/udp_beacon/CMakeLists.txt +++ b/pico_w/wifi/udp_beacon/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(udp_beacon C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(picow_udp_beacon_background picow_udp_beacon.c ) diff --git a/pico_w/wifi/wifi_scan/CMakeLists.txt b/pico_w/wifi/wifi_scan/CMakeLists.txt index ba0cd4f97..ab755413d 100644 --- a/pico_w/wifi/wifi_scan/CMakeLists.txt +++ b/pico_w/wifi/wifi_scan/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(wifi_scan C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(picow_wifi_scan_background picow_wifi_scan.c ) diff --git a/picoboard/blinky/CMakeLists.txt b/picoboard/blinky/CMakeLists.txt index e3e57abc7..51f0915d4 100644 --- a/picoboard/blinky/CMakeLists.txt +++ b/picoboard/blinky/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(blinky C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(picoboard_blinky blinky.c ) diff --git a/picoboard/button/CMakeLists.txt b/picoboard/button/CMakeLists.txt index c3ef5d726..66ee07fef 100644 --- a/picoboard/button/CMakeLists.txt +++ b/picoboard/button/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(button C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(picoboard_button button.c ) diff --git a/pio/addition/CMakeLists.txt b/pio/addition/CMakeLists.txt index 9ff90779e..f01bcdaad 100644 --- a/pio/addition/CMakeLists.txt +++ b/pio/addition/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(addition C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_addition) pico_generate_pio_header(pio_addition ${CMAKE_CURRENT_LIST_DIR}/addition.pio) diff --git a/pio/apa102/CMakeLists.txt b/pio/apa102/CMakeLists.txt index 1522f5564..4721e40ba 100644 --- a/pio/apa102/CMakeLists.txt +++ b/pio/apa102/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(apa102 C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_apa102) pico_generate_pio_header(pio_apa102 ${CMAKE_CURRENT_LIST_DIR}/apa102.pio) diff --git a/pio/clocked_input/CMakeLists.txt b/pio/clocked_input/CMakeLists.txt index cd71408a3..9a0b7b2da 100644 --- a/pio/clocked_input/CMakeLists.txt +++ b/pio/clocked_input/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(clocked_input C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_clocked_input) pico_generate_pio_header(pio_clocked_input ${CMAKE_CURRENT_LIST_DIR}/clocked_input.pio) diff --git a/pio/differential_manchester/CMakeLists.txt b/pio/differential_manchester/CMakeLists.txt index 6276f09f5..0725bcbef 100644 --- a/pio/differential_manchester/CMakeLists.txt +++ b/pio/differential_manchester/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(differential_manchester C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_differential_manchester) pico_generate_pio_header(pio_differential_manchester ${CMAKE_CURRENT_LIST_DIR}/differential_manchester.pio) diff --git a/pio/hello_pio/CMakeLists.txt b/pio/hello_pio/CMakeLists.txt index 1c1d67496..e10bf1a29 100644 --- a/pio/hello_pio/CMakeLists.txt +++ b/pio/hello_pio/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_pio C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_pio) pico_generate_pio_header(hello_pio ${CMAKE_CURRENT_LIST_DIR}/hello.pio) diff --git a/pio/hub75/CMakeLists.txt b/pio/hub75/CMakeLists.txt index a976f4eab..0cd6d7643 100644 --- a/pio/hub75/CMakeLists.txt +++ b/pio/hub75/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hub75 C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_hub75) pico_generate_pio_header(pio_hub75 ${CMAKE_CURRENT_LIST_DIR}/hub75.pio) diff --git a/pio/i2c/CMakeLists.txt b/pio/i2c/CMakeLists.txt index d49b22482..05e7a423f 100644 --- a/pio/i2c/CMakeLists.txt +++ b/pio/i2c/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(i2c C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_i2c_bus_scan) pico_generate_pio_header(pio_i2c_bus_scan ${CMAKE_CURRENT_LIST_DIR}/i2c.pio) diff --git a/pio/ir_nec/ir_loopback/CMakeLists.txt b/pio/ir_nec/ir_loopback/CMakeLists.txt index 8c7d8f4b7..c84ef8d99 100644 --- a/pio/ir_nec/ir_loopback/CMakeLists.txt +++ b/pio/ir_nec/ir_loopback/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(ir_loopback C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable (pio_ir_loopback ir_loopback.c) # link the executable using the IR transmit and receive libraries diff --git a/pio/logic_analyser/CMakeLists.txt b/pio/logic_analyser/CMakeLists.txt index 8a65198a9..1e78df9ae 100644 --- a/pio/logic_analyser/CMakeLists.txt +++ b/pio/logic_analyser/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(logic_analyser C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_logic_analyser) target_sources(pio_logic_analyser PRIVATE logic_analyser.c) diff --git a/pio/manchester_encoding/CMakeLists.txt b/pio/manchester_encoding/CMakeLists.txt index 70b88283a..4c165cfa2 100644 --- a/pio/manchester_encoding/CMakeLists.txt +++ b/pio/manchester_encoding/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(manchester_encoding C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_manchester_encoding) pico_generate_pio_header(pio_manchester_encoding ${CMAKE_CURRENT_LIST_DIR}/manchester_encoding.pio) diff --git a/pio/onewire/CMakeLists.txt b/pio/onewire/CMakeLists.txt index 4090cb36c..aca566dc2 100644 --- a/pio/onewire/CMakeLists.txt +++ b/pio/onewire/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(onewire C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_onewire) target_sources(pio_onewire PRIVATE onewire.c) diff --git a/pio/pio_blink/CMakeLists.txt b/pio/pio_blink/CMakeLists.txt index 88b5584fd..f9c961fa3 100644 --- a/pio/pio_blink/CMakeLists.txt +++ b/pio/pio_blink/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(pio_blink C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_blink) # by default the header is generated into the build dir diff --git a/pio/pwm/CMakeLists.txt b/pio/pwm/CMakeLists.txt index 7c6f2fc01..506f32670 100644 --- a/pio/pwm/CMakeLists.txt +++ b/pio/pwm/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(pwm C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_pwm) pico_generate_pio_header(pio_pwm ${CMAKE_CURRENT_LIST_DIR}/pwm.pio) diff --git a/pio/quadrature_encoder/CMakeLists.txt b/pio/quadrature_encoder/CMakeLists.txt index b118f3c27..6b59240cf 100644 --- a/pio/quadrature_encoder/CMakeLists.txt +++ b/pio/quadrature_encoder/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(quadrature_encoder C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_quadrature_encoder) pico_generate_pio_header(pio_quadrature_encoder ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder.pio) diff --git a/pio/quadrature_encoder_substep/CMakeLists.txt b/pio/quadrature_encoder_substep/CMakeLists.txt index 7bc7f6a0a..abebad841 100644 --- a/pio/quadrature_encoder_substep/CMakeLists.txt +++ b/pio/quadrature_encoder_substep/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(quadrature_encoder_substep C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_quadrature_encoder_substep) pico_generate_pio_header(pio_quadrature_encoder_substep ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder_substep.pio) diff --git a/pio/spi/CMakeLists.txt b/pio/spi/CMakeLists.txt index 44c561a85..d413abb51 100644 --- a/pio/spi/CMakeLists.txt +++ b/pio/spi/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(spi C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_spi_flash) pico_generate_pio_header(pio_spi_flash ${CMAKE_CURRENT_LIST_DIR}/spi.pio) diff --git a/pio/squarewave/CMakeLists.txt b/pio/squarewave/CMakeLists.txt index fe503bb1d..6e4795c14 100644 --- a/pio/squarewave/CMakeLists.txt +++ b/pio/squarewave/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(squarewave C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_squarewave) pico_generate_pio_header(pio_squarewave ${CMAKE_CURRENT_LIST_DIR}/squarewave.pio) diff --git a/pio/st7789_lcd/CMakeLists.txt b/pio/st7789_lcd/CMakeLists.txt index a6243e646..996b92274 100644 --- a/pio/st7789_lcd/CMakeLists.txt +++ b/pio/st7789_lcd/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(st7789_lcd C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_st7789_lcd) pico_generate_pio_header(pio_st7789_lcd ${CMAKE_CURRENT_LIST_DIR}/st7789_lcd.pio) diff --git a/pio/uart_rx/CMakeLists.txt b/pio/uart_rx/CMakeLists.txt index 5f985e1bb..a9069ad6b 100644 --- a/pio/uart_rx/CMakeLists.txt +++ b/pio/uart_rx/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(uart_rx C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_uart_rx) pico_generate_pio_header(pio_uart_rx ${CMAKE_CURRENT_LIST_DIR}/uart_rx.pio) diff --git a/pio/uart_tx/CMakeLists.txt b/pio/uart_tx/CMakeLists.txt index 5e3cf2a82..c54a6b543 100644 --- a/pio/uart_tx/CMakeLists.txt +++ b/pio/uart_tx/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(uart_tx C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_uart_tx) pico_generate_pio_header(pio_uart_tx ${CMAKE_CURRENT_LIST_DIR}/uart_tx.pio) diff --git a/pio/ws2812/CMakeLists.txt b/pio/ws2812/CMakeLists.txt index 3e887b908..94baddf4f 100644 --- a/pio/ws2812/CMakeLists.txt +++ b/pio/ws2812/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(ws2812 C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pio_ws2812) file(MAKE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/generated) diff --git a/pwm/hello_pwm/CMakeLists.txt b/pwm/hello_pwm/CMakeLists.txt index e2df80ceb..6a9796517 100644 --- a/pwm/hello_pwm/CMakeLists.txt +++ b/pwm/hello_pwm/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_pwm C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_pwm hello_pwm.c ) diff --git a/pwm/led_fade/CMakeLists.txt b/pwm/led_fade/CMakeLists.txt index a9f5eea56..874aaa918 100644 --- a/pwm/led_fade/CMakeLists.txt +++ b/pwm/led_fade/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(led_fade C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pwm_led_fade pwm_led_fade.c ) diff --git a/pwm/measure_duty_cycle/CMakeLists.txt b/pwm/measure_duty_cycle/CMakeLists.txt index 45bd4d623..8be5b92f7 100644 --- a/pwm/measure_duty_cycle/CMakeLists.txt +++ b/pwm/measure_duty_cycle/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(measure_duty_cycle C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(pwm_measure_duty_cycle measure_duty_cycle.c ) diff --git a/reset/hello_reset/CMakeLists.txt b/reset/hello_reset/CMakeLists.txt index fc0854377..192bf0ed5 100644 --- a/reset/hello_reset/CMakeLists.txt +++ b/reset/hello_reset/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_reset C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (TARGET hardware_resets) add_executable(hello_reset hello_reset.c diff --git a/rtc/hello_rtc/CMakeLists.txt b/rtc/hello_rtc/CMakeLists.txt index b3cc1a25c..a7f106a48 100644 --- a/rtc/hello_rtc/CMakeLists.txt +++ b/rtc/hello_rtc/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_rtc C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_rtc hello_rtc.c ) diff --git a/rtc/rtc_alarm/CMakeLists.txt b/rtc/rtc_alarm/CMakeLists.txt index 8f0dfa2cb..b5952b5ab 100644 --- a/rtc/rtc_alarm/CMakeLists.txt +++ b/rtc/rtc_alarm/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(rtc_alarm C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(rtc_alarm rtc_alarm.c ) diff --git a/rtc/rtc_alarm_repeat/CMakeLists.txt b/rtc/rtc_alarm_repeat/CMakeLists.txt index bd3c9e3e0..abaa12f05 100644 --- a/rtc/rtc_alarm_repeat/CMakeLists.txt +++ b/rtc/rtc_alarm_repeat/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(rtc_alarm_repeat C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(rtc_alarm_repeat rtc_alarm_repeat.c ) diff --git a/sha/mbedtls_sha256/CMakeLists.txt b/sha/mbedtls_sha256/CMakeLists.txt index a9bec5d18..96f1ababa 100644 --- a/sha/mbedtls_sha256/CMakeLists.txt +++ b/sha/mbedtls_sha256/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(mbedtls_sha256 C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (NOT TARGET hardware_sha256) return() endif() diff --git a/sha/sha256/CMakeLists.txt b/sha/sha256/CMakeLists.txt index 5835fe863..55d5108aa 100644 --- a/sha/sha256/CMakeLists.txt +++ b/sha/sha256/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(sha256 C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (NOT TARGET hardware_sha256) return() endif() diff --git a/spi/bme280_spi/CMakeLists.txt b/spi/bme280_spi/CMakeLists.txt index 117d01a51..d0646afc5 100644 --- a/spi/bme280_spi/CMakeLists.txt +++ b/spi/bme280_spi/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(bme280_spi C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(bme280_spi bme280_spi.c ) diff --git a/spi/max7219_32x8_spi/CMakeLists.txt b/spi/max7219_32x8_spi/CMakeLists.txt index 415eb33f3..2bb83127b 100644 --- a/spi/max7219_32x8_spi/CMakeLists.txt +++ b/spi/max7219_32x8_spi/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(max7219_32x8_spi C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(max7219_32x8_spi max7219_32x8_spi.c ) diff --git a/spi/max7219_8x7seg_spi/CMakeLists.txt b/spi/max7219_8x7seg_spi/CMakeLists.txt index ab0b08c12..c3255dad4 100644 --- a/spi/max7219_8x7seg_spi/CMakeLists.txt +++ b/spi/max7219_8x7seg_spi/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(max7219_8x7seg_spi C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(max7219_8x7seg_spi max7219_8x7seg_spi.c ) diff --git a/spi/mpu9250_spi/CMakeLists.txt b/spi/mpu9250_spi/CMakeLists.txt index 5e0a6120a..cc907c35c 100644 --- a/spi/mpu9250_spi/CMakeLists.txt +++ b/spi/mpu9250_spi/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(mpu9250_spi C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(mpu9250_spi mpu9250_spi.c ) diff --git a/spi/spi_dma/CMakeLists.txt b/spi/spi_dma/CMakeLists.txt index 3adfdda60..a4a1bef5e 100644 --- a/spi/spi_dma/CMakeLists.txt +++ b/spi/spi_dma/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(spi_dma C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(spi_dma spi_dma.c ) diff --git a/spi/spi_flash/CMakeLists.txt b/spi/spi_flash/CMakeLists.txt index 2a0ddcc35..a5e534293 100644 --- a/spi/spi_flash/CMakeLists.txt +++ b/spi/spi_flash/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(spi_flash C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(spi_flash spi_flash.c ) diff --git a/spi/spi_master_slave/spi_master/CMakeLists.txt b/spi/spi_master_slave/spi_master/CMakeLists.txt index 534e78fd6..8a74737f5 100644 --- a/spi/spi_master_slave/spi_master/CMakeLists.txt +++ b/spi/spi_master_slave/spi_master/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(spi_master C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(spi_master spi_master.c ) diff --git a/spi/spi_master_slave/spi_slave/CMakeLists.txt b/spi/spi_master_slave/spi_slave/CMakeLists.txt index 8e0564506..b1ed04089 100644 --- a/spi/spi_master_slave/spi_slave/CMakeLists.txt +++ b/spi/spi_master_slave/spi_slave/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(spi_slave C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(spi_slave spi_slave.c ) diff --git a/system/boot_info/CMakeLists.txt b/system/boot_info/CMakeLists.txt index ec166f968..752472c07 100644 --- a/system/boot_info/CMakeLists.txt +++ b/system/boot_info/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(boot_info C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(boot_info boot_info.c ) diff --git a/system/hello_double_tap/CMakeLists.txt b/system/hello_double_tap/CMakeLists.txt index 30a9e12f7..eeed3b78f 100644 --- a/system/hello_double_tap/CMakeLists.txt +++ b/system/hello_double_tap/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_double_tap C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_double_tap hello_double_tap.c ) diff --git a/system/narrow_io_write/CMakeLists.txt b/system/narrow_io_write/CMakeLists.txt index 5e57819d7..a13cce156 100644 --- a/system/narrow_io_write/CMakeLists.txt +++ b/system/narrow_io_write/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(narrow_io_write C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(narrow_io_write narrow_io_write.c ) diff --git a/system/rand/CMakeLists.txt b/system/rand/CMakeLists.txt index f874c9f78..dc9334780 100644 --- a/system/rand/CMakeLists.txt +++ b/system/rand/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(rand C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(rand rand.c ) diff --git a/system/unique_board_id/CMakeLists.txt b/system/unique_board_id/CMakeLists.txt index 1a5b1f989..e80648f17 100644 --- a/system/unique_board_id/CMakeLists.txt +++ b/system/unique_board_id/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(unique_board_id C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(unique_board_id unique_board_id.c ) diff --git a/timer/hello_timer/CMakeLists.txt b/timer/hello_timer/CMakeLists.txt index 806cf699f..30eacc0ad 100644 --- a/timer/hello_timer/CMakeLists.txt +++ b/timer/hello_timer/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_timer C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_timer hello_timer.c ) diff --git a/timer/periodic_sampler/CMakeLists.txt b/timer/periodic_sampler/CMakeLists.txt index 284780fb3..d5f8af67a 100644 --- a/timer/periodic_sampler/CMakeLists.txt +++ b/timer/periodic_sampler/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(periodic_sampler C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (NOT PICO_TIME_NO_ALARM_SUPPORT) add_executable(periodic_sampler periodic_sampler.c diff --git a/timer/timer_lowlevel/CMakeLists.txt b/timer/timer_lowlevel/CMakeLists.txt index 55d4e82aa..3cee215dd 100644 --- a/timer/timer_lowlevel/CMakeLists.txt +++ b/timer/timer_lowlevel/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(timer_lowlevel C CXX ASM) + include(../../CMakeLists.txt) +endif() + if (PICO_ON_DEVICE) add_executable(timer_lowlevel timer_lowlevel.c) diff --git a/uart/hello_uart/CMakeLists.txt b/uart/hello_uart/CMakeLists.txt index 0931f384d..d072dd550 100644 --- a/uart/hello_uart/CMakeLists.txt +++ b/uart/hello_uart/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_uart C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_uart hello_uart.c ) diff --git a/uart/lcd_uart/CMakeLists.txt b/uart/lcd_uart/CMakeLists.txt index 64098821f..a82f9a472 100644 --- a/uart/lcd_uart/CMakeLists.txt +++ b/uart/lcd_uart/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(lcd_uart C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(lcd_uart lcd_uart.c ) diff --git a/uart/uart_advanced/CMakeLists.txt b/uart/uart_advanced/CMakeLists.txt index a7cf5638e..fdf1cb569 100644 --- a/uart/uart_advanced/CMakeLists.txt +++ b/uart/uart_advanced/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(uart_advanced C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(uart_advanced uart_advanced.c ) diff --git a/universal/hello_universal/CMakeLists.txt b/universal/hello_universal/CMakeLists.txt index 51269beac..00dbde3e6 100644 --- a/universal/hello_universal/CMakeLists.txt +++ b/universal/hello_universal/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_universal C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_universal hello_universal.c ) diff --git a/usb/device/dev_hid_composite/CMakeLists.txt b/usb/device/dev_hid_composite/CMakeLists.txt index cd035d9a5..e0abfc849 100644 --- a/usb/device/dev_hid_composite/CMakeLists.txt +++ b/usb/device/dev_hid_composite/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(dev_hid_composite C CXX ASM) + include(../../../CMakeLists.txt) +endif() + cmake_minimum_required(VERSION 3.13) add_executable(dev_hid_composite) diff --git a/usb/device/dev_lowlevel/CMakeLists.txt b/usb/device/dev_lowlevel/CMakeLists.txt index 906c84e5f..d751400c1 100644 --- a/usb/device/dev_lowlevel/CMakeLists.txt +++ b/usb/device/dev_lowlevel/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(dev_lowlevel C CXX ASM) + include(../../../CMakeLists.txt) +endif() + add_executable(dev_lowlevel dev_lowlevel.c ) diff --git a/usb/host/host_cdc_msc_hid/CMakeLists.txt b/usb/host/host_cdc_msc_hid/CMakeLists.txt index 55f5a4a98..385201219 100644 --- a/usb/host/host_cdc_msc_hid/CMakeLists.txt +++ b/usb/host/host_cdc_msc_hid/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../../CMakeLists.txt) + project(host_cdc_msc_hid C CXX ASM) + include(../../../CMakeLists.txt) +endif() + cmake_minimum_required(VERSION 3.13) add_executable(host_cdc_msc_hid) diff --git a/watchdog/hello_watchdog/CMakeLists.txt b/watchdog/hello_watchdog/CMakeLists.txt index 9e1e5d006..c6340863a 100644 --- a/watchdog/hello_watchdog/CMakeLists.txt +++ b/watchdog/hello_watchdog/CMakeLists.txt @@ -1,3 +1,11 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + include(../../CMakeLists.txt) + project(hello_watchdog C CXX ASM) + include(../../CMakeLists.txt) +endif() + add_executable(hello_watchdog hello_watchdog.c ) From fa9d1d3cf6c821a00893dd9b97d40021591e30dd Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Wed, 5 Feb 2025 10:33:28 +0000 Subject: [PATCH 2/3] Revert "Add support for configuring examples individually" This reverts commit 129ec663789faa0b9fa0740bf8dbc0e881d11e70. --- CMakeLists.txt | 99 +++++++++---------- adc/adc_console/CMakeLists.txt | 8 -- adc/dma_capture/CMakeLists.txt | 8 -- adc/hello_adc/CMakeLists.txt | 8 -- adc/joystick_display/CMakeLists.txt | 8 -- adc/microphone_adc/CMakeLists.txt | 8 -- adc/onboard_temperature/CMakeLists.txt | 8 -- adc/read_vsys/CMakeLists.txt | 8 -- binary_info/blink_any/CMakeLists.txt | 8 -- binary_info/hello_anything/CMakeLists.txt | 8 -- blink/CMakeLists.txt | 8 -- blink_simple/CMakeLists.txt | 8 -- bootloaders/encrypted/CMakeLists.txt | 8 -- clocks/detached_clk_peri/CMakeLists.txt | 8 -- clocks/hello_48MHz/CMakeLists.txt | 8 -- clocks/hello_gpout/CMakeLists.txt | 8 -- clocks/hello_resus/CMakeLists.txt | 8 -- cmake/build_variants/CMakeLists.txt | 8 -- dcp/hello_dcp/CMakeLists.txt | 8 -- divider/CMakeLists.txt | 8 -- dma/channel_irq/CMakeLists.txt | 8 -- dma/control_blocks/CMakeLists.txt | 8 -- dma/hello_dma/CMakeLists.txt | 8 -- dma/sniff_crc/CMakeLists.txt | 8 -- flash/cache_perfctr/CMakeLists.txt | 8 -- flash/nuke/CMakeLists.txt | 8 -- flash/program/CMakeLists.txt | 8 -- .../runtime_flash_permissions/CMakeLists.txt | 8 -- flash/ssi_dma/CMakeLists.txt | 8 -- flash/xip_stream/CMakeLists.txt | 8 -- freertos/hello_freertos/CMakeLists.txt | 8 -- gpio/dht_sensor/CMakeLists.txt | 8 -- gpio/hello_7segment/CMakeLists.txt | 8 -- gpio/hello_gpio_irq/CMakeLists.txt | 8 -- hello_world/serial/CMakeLists.txt | 8 -- hello_world/usb/CMakeLists.txt | 8 -- hstx/dvi_out_hstx_encoder/CMakeLists.txt | 8 -- hstx/spi_lcd/CMakeLists.txt | 8 -- i2c/bmp280_i2c/CMakeLists.txt | 8 -- i2c/bus_scan/CMakeLists.txt | 8 -- i2c/ht16k33_i2c/CMakeLists.txt | 8 -- i2c/lcd_1602_i2c/CMakeLists.txt | 8 -- i2c/lis3dh_i2c/CMakeLists.txt | 8 -- i2c/mcp9808_i2c/CMakeLists.txt | 8 -- i2c/mma8451_i2c/CMakeLists.txt | 8 -- i2c/mpl3115a2_i2c/CMakeLists.txt | 8 -- i2c/mpu6050_i2c/CMakeLists.txt | 8 -- i2c/pa1010d_i2c/CMakeLists.txt | 8 -- i2c/pcf8523_i2c/CMakeLists.txt | 8 -- i2c/slave_mem_i2c/CMakeLists.txt | 8 -- i2c/ssd1306_i2c/CMakeLists.txt | 8 -- interp/hello_interp/CMakeLists.txt | 8 -- multicore/hello_multicore/CMakeLists.txt | 8 -- multicore/multicore_doorbell/CMakeLists.txt | 8 -- multicore/multicore_fifo_irqs/CMakeLists.txt | 8 -- multicore/multicore_runner/CMakeLists.txt | 8 -- .../multicore_runner_queue/CMakeLists.txt | 8 -- otp/hello_otp/CMakeLists.txt | 8 -- pico_w/bt/CMakeLists.txt | 8 -- pico_w/bt/standalone/CMakeLists.txt | 8 -- pico_w/wifi/access_point/CMakeLists.txt | 8 -- pico_w/wifi/blink/CMakeLists.txt | 8 -- .../wifi/freertos/http_client/CMakeLists.txt | 8 -- pico_w/wifi/freertos/httpd/CMakeLists.txt | 8 -- pico_w/wifi/freertos/iperf/CMakeLists.txt | 8 -- .../freertos/ntp_client_socket/CMakeLists.txt | 8 -- pico_w/wifi/freertos/ping/CMakeLists.txt | 8 -- pico_w/wifi/http_client/CMakeLists.txt | 8 -- pico_w/wifi/httpd/CMakeLists.txt | 8 -- pico_w/wifi/iperf/CMakeLists.txt | 8 -- pico_w/wifi/ntp_client/CMakeLists.txt | 8 -- pico_w/wifi/tcp_client/CMakeLists.txt | 8 -- pico_w/wifi/tcp_server/CMakeLists.txt | 8 -- pico_w/wifi/tls_client/CMakeLists.txt | 8 -- pico_w/wifi/udp_beacon/CMakeLists.txt | 8 -- pico_w/wifi/wifi_scan/CMakeLists.txt | 8 -- picoboard/blinky/CMakeLists.txt | 8 -- picoboard/button/CMakeLists.txt | 8 -- pio/addition/CMakeLists.txt | 8 -- pio/apa102/CMakeLists.txt | 8 -- pio/clocked_input/CMakeLists.txt | 8 -- pio/differential_manchester/CMakeLists.txt | 8 -- pio/hello_pio/CMakeLists.txt | 8 -- pio/hub75/CMakeLists.txt | 8 -- pio/i2c/CMakeLists.txt | 8 -- pio/ir_nec/ir_loopback/CMakeLists.txt | 8 -- pio/logic_analyser/CMakeLists.txt | 8 -- pio/manchester_encoding/CMakeLists.txt | 8 -- pio/onewire/CMakeLists.txt | 8 -- pio/pio_blink/CMakeLists.txt | 8 -- pio/pwm/CMakeLists.txt | 8 -- pio/quadrature_encoder/CMakeLists.txt | 8 -- pio/quadrature_encoder_substep/CMakeLists.txt | 8 -- pio/spi/CMakeLists.txt | 8 -- pio/squarewave/CMakeLists.txt | 8 -- pio/st7789_lcd/CMakeLists.txt | 8 -- pio/uart_rx/CMakeLists.txt | 8 -- pio/uart_tx/CMakeLists.txt | 8 -- pio/ws2812/CMakeLists.txt | 8 -- pwm/hello_pwm/CMakeLists.txt | 8 -- pwm/led_fade/CMakeLists.txt | 8 -- pwm/measure_duty_cycle/CMakeLists.txt | 8 -- reset/hello_reset/CMakeLists.txt | 8 -- rtc/hello_rtc/CMakeLists.txt | 8 -- rtc/rtc_alarm/CMakeLists.txt | 8 -- rtc/rtc_alarm_repeat/CMakeLists.txt | 8 -- sha/mbedtls_sha256/CMakeLists.txt | 8 -- sha/sha256/CMakeLists.txt | 8 -- spi/bme280_spi/CMakeLists.txt | 8 -- spi/max7219_32x8_spi/CMakeLists.txt | 8 -- spi/max7219_8x7seg_spi/CMakeLists.txt | 8 -- spi/mpu9250_spi/CMakeLists.txt | 8 -- spi/spi_dma/CMakeLists.txt | 8 -- spi/spi_flash/CMakeLists.txt | 8 -- .../spi_master/CMakeLists.txt | 8 -- spi/spi_master_slave/spi_slave/CMakeLists.txt | 8 -- system/boot_info/CMakeLists.txt | 8 -- system/hello_double_tap/CMakeLists.txt | 8 -- system/narrow_io_write/CMakeLists.txt | 8 -- system/rand/CMakeLists.txt | 8 -- system/unique_board_id/CMakeLists.txt | 8 -- timer/hello_timer/CMakeLists.txt | 8 -- timer/periodic_sampler/CMakeLists.txt | 8 -- timer/timer_lowlevel/CMakeLists.txt | 8 -- uart/hello_uart/CMakeLists.txt | 8 -- uart/lcd_uart/CMakeLists.txt | 8 -- uart/uart_advanced/CMakeLists.txt | 8 -- universal/hello_universal/CMakeLists.txt | 8 -- usb/device/dev_hid_composite/CMakeLists.txt | 8 -- usb/device/dev_lowlevel/CMakeLists.txt | 8 -- usb/host/host_cdc_msc_hid/CMakeLists.txt | 8 -- watchdog/hello_watchdog/CMakeLists.txt | 8 -- 132 files changed, 44 insertions(+), 1103 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f154ba25d..597cb3e57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,19 +1,10 @@ cmake_minimum_required(VERSION 3.12) -if (NOT CMAKE_PROJECT_NAME) - # Pull in SDK (must be before project) - include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) - include(${CMAKE_CURRENT_LIST_DIR}/pico_extras_import_optional.cmake) +# Pull in SDK (must be before project) +include(pico_sdk_import.cmake) +include(pico_extras_import_optional.cmake) - pico_is_top_level_project(PICO_EXAMPLES_TOP_LEVEL_PROJECT) - - if (PICO_EXAMPLES_TOP_LEVEL_PROJECT) - project(pico_examples C CXX ASM) - else() - # Go back to individual example for project - return() - endif() -endif() +project(pico_examples C CXX ASM) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) @@ -22,7 +13,7 @@ if (PICO_SDK_VERSION_STRING VERSION_LESS "2.1.0") message(FATAL_ERROR "Raspberry Pi Pico SDK version 2.1.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}") endif() -set(PICO_EXAMPLES_PATH ${CMAKE_CURRENT_LIST_DIR}) +set(PICO_EXAMPLES_PATH ${PROJECT_SOURCE_DIR}) # If you want debug output from USB (pass -DPICO_STDIO_USB=1) this ensures you don't lose any debug output while USB is set up if (NOT DEFINED PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS) @@ -32,7 +23,7 @@ endif() # Initialize the SDK pico_sdk_init() -include(${CMAKE_CURRENT_LIST_DIR}/example_auto_set_url.cmake) +include(example_auto_set_url.cmake) function(add_subdirectory_exclude_platforms NAME) if (ARGN) @@ -51,6 +42,13 @@ function(add_subdirectory_exclude_platforms NAME) add_subdirectory(${NAME}) endfunction() +# Add blink example +add_subdirectory_exclude_platforms(blink) +add_subdirectory_exclude_platforms(blink_simple) + +# Add hello world example +add_subdirectory_exclude_platforms(hello_world) + add_compile_options(-Wall -Wno-format # int != int32_t as far as the compiler is concerned because gcc has int32_t as long int -Wno-unused-function # we have some for the docs that aren't called @@ -59,43 +57,34 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU") add_compile_options(-Wno-maybe-uninitialized) endif() -if (PICO_EXAMPLES_TOP_LEVEL_PROJECT) - # Add blink example - add_subdirectory_exclude_platforms(blink) - add_subdirectory_exclude_platforms(blink_simple) - - # Add hello world example - add_subdirectory_exclude_platforms(hello_world) - - # Hardware-specific examples in subdirectories: - add_subdirectory(adc) - add_subdirectory(binary_info) - add_subdirectory(bootloaders) - add_subdirectory(clocks) - add_subdirectory(cmake) - add_subdirectory(dcp) - add_subdirectory(divider) - add_subdirectory(dma) - add_subdirectory(flash) - add_subdirectory(gpio) - add_subdirectory(hstx) - add_subdirectory(i2c) - add_subdirectory(interp) - add_subdirectory(multicore) - add_subdirectory(otp) - add_subdirectory(picoboard) - add_subdirectory(pico_w) - add_subdirectory(pio) - add_subdirectory(pwm) - add_subdirectory(reset) - add_subdirectory(rtc) - add_subdirectory(spi) - add_subdirectory(system) - add_subdirectory(timer) - add_subdirectory(uart) - add_subdirectory(universal) - add_subdirectory(usb) - add_subdirectory(watchdog) - add_subdirectory(sha) - add_subdirectory(freertos) -endif() +# Hardware-specific examples in subdirectories: +add_subdirectory(adc) +add_subdirectory(binary_info) +add_subdirectory(bootloaders) +add_subdirectory(clocks) +add_subdirectory(cmake) +add_subdirectory(dcp) +add_subdirectory(divider) +add_subdirectory(dma) +add_subdirectory(flash) +add_subdirectory(gpio) +add_subdirectory(hstx) +add_subdirectory(i2c) +add_subdirectory(interp) +add_subdirectory(multicore) +add_subdirectory(otp) +add_subdirectory(picoboard) +add_subdirectory(pico_w) +add_subdirectory(pio) +add_subdirectory(pwm) +add_subdirectory(reset) +add_subdirectory(rtc) +add_subdirectory(spi) +add_subdirectory(system) +add_subdirectory(timer) +add_subdirectory(uart) +add_subdirectory(universal) +add_subdirectory(usb) +add_subdirectory(watchdog) +add_subdirectory(sha) +add_subdirectory(freertos) diff --git a/adc/adc_console/CMakeLists.txt b/adc/adc_console/CMakeLists.txt index cad5a27db..944a93d2d 100644 --- a/adc/adc_console/CMakeLists.txt +++ b/adc/adc_console/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(adc_console C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(adc_console adc_console.c ) diff --git a/adc/dma_capture/CMakeLists.txt b/adc/dma_capture/CMakeLists.txt index 58573832b..ff965e9db 100644 --- a/adc/dma_capture/CMakeLists.txt +++ b/adc/dma_capture/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(dma_capture C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(adc_dma_capture dma_capture.c ) diff --git a/adc/hello_adc/CMakeLists.txt b/adc/hello_adc/CMakeLists.txt index 47b898fe4..186318246 100644 --- a/adc/hello_adc/CMakeLists.txt +++ b/adc/hello_adc/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_adc C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_adc hello_adc.c ) diff --git a/adc/joystick_display/CMakeLists.txt b/adc/joystick_display/CMakeLists.txt index ff7aa37eb..96bb475ad 100644 --- a/adc/joystick_display/CMakeLists.txt +++ b/adc/joystick_display/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(joystick_display C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(joystick_display joystick_display.c ) diff --git a/adc/microphone_adc/CMakeLists.txt b/adc/microphone_adc/CMakeLists.txt index 6f7282515..87f2c4029 100644 --- a/adc/microphone_adc/CMakeLists.txt +++ b/adc/microphone_adc/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(microphone_adc C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(microphone_adc microphone_adc.c ) diff --git a/adc/onboard_temperature/CMakeLists.txt b/adc/onboard_temperature/CMakeLists.txt index 464dd0c48..1557ed234 100644 --- a/adc/onboard_temperature/CMakeLists.txt +++ b/adc/onboard_temperature/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(onboard_temperature C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(onboard_temperature onboard_temperature.c) target_link_libraries(onboard_temperature pico_stdlib hardware_adc) diff --git a/adc/read_vsys/CMakeLists.txt b/adc/read_vsys/CMakeLists.txt index 404d701e2..67535bd72 100644 --- a/adc/read_vsys/CMakeLists.txt +++ b/adc/read_vsys/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(read_vsys C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_library(power_status_adc INTERFACE) target_sources(power_status_adc INTERFACE ${CMAKE_CURRENT_LIST_DIR}/power_status.c diff --git a/binary_info/blink_any/CMakeLists.txt b/binary_info/blink_any/CMakeLists.txt index df21f0747..de0401993 100644 --- a/binary_info/blink_any/CMakeLists.txt +++ b/binary_info/blink_any/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(blink_any C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (NOT PICO_CYW43_SUPPORTED) message("Only building blink_any for non W boards as PICO_CYW43_SUPPORTED is not set") endif() diff --git a/binary_info/hello_anything/CMakeLists.txt b/binary_info/hello_anything/CMakeLists.txt index 91d49f54b..13aa84380 100644 --- a/binary_info/hello_anything/CMakeLists.txt +++ b/binary_info/hello_anything/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_anything C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (TARGET tinyusb_device) add_executable(hello_anything hello_anything.c diff --git a/blink/CMakeLists.txt b/blink/CMakeLists.txt index dba6bd516..6308572d4 100644 --- a/blink/CMakeLists.txt +++ b/blink/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../CMakeLists.txt) - project(blink C CXX ASM) - include(../CMakeLists.txt) -endif() - add_executable(blink blink.c ) diff --git a/blink_simple/CMakeLists.txt b/blink_simple/CMakeLists.txt index a26946099..0d7c0cb44 100644 --- a/blink_simple/CMakeLists.txt +++ b/blink_simple/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../CMakeLists.txt) - project(blink_simple C CXX ASM) - include(../CMakeLists.txt) -endif() - add_executable(blink_simple blink_simple.c ) diff --git a/bootloaders/encrypted/CMakeLists.txt b/bootloaders/encrypted/CMakeLists.txt index ce4b8a4c8..f29f0efe2 100644 --- a/bootloaders/encrypted/CMakeLists.txt +++ b/bootloaders/encrypted/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(encrypted C CXX ASM) - include(../../CMakeLists.txt) -endif() - # Encrypted Bootloader add_executable(enc_bootloader enc_bootloader.c diff --git a/clocks/detached_clk_peri/CMakeLists.txt b/clocks/detached_clk_peri/CMakeLists.txt index 1f5389af2..d3dc75e01 100644 --- a/clocks/detached_clk_peri/CMakeLists.txt +++ b/clocks/detached_clk_peri/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(detached_clk_peri C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(clocks_detached_clk_peri detached_clk_peri.c ) diff --git a/clocks/hello_48MHz/CMakeLists.txt b/clocks/hello_48MHz/CMakeLists.txt index d51edd770..3ca96fc52 100644 --- a/clocks/hello_48MHz/CMakeLists.txt +++ b/clocks/hello_48MHz/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_48MHz C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_48MHz hello_48MHz.c ) diff --git a/clocks/hello_gpout/CMakeLists.txt b/clocks/hello_gpout/CMakeLists.txt index 36297bf0d..057ec3c5f 100644 --- a/clocks/hello_gpout/CMakeLists.txt +++ b/clocks/hello_gpout/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_gpout C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_gpout hello_gpout.c ) diff --git a/clocks/hello_resus/CMakeLists.txt b/clocks/hello_resus/CMakeLists.txt index 57ab28f78..9d4522e94 100644 --- a/clocks/hello_resus/CMakeLists.txt +++ b/clocks/hello_resus/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_resus C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_resus hello_resus.c ) diff --git a/cmake/build_variants/CMakeLists.txt b/cmake/build_variants/CMakeLists.txt index fb5b7132d..f40f80625 100644 --- a/cmake/build_variants/CMakeLists.txt +++ b/cmake/build_variants/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(build_variants C CXX ASM) - include(../../CMakeLists.txt) -endif() - # 1 Create an INTERFACE library aggregating all the common parts of the application add_library(common_stuff INTERFACE) diff --git a/dcp/hello_dcp/CMakeLists.txt b/dcp/hello_dcp/CMakeLists.txt index 6e5167bda..2235fb271 100644 --- a/dcp/hello_dcp/CMakeLists.txt +++ b/dcp/hello_dcp/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_dcp C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_dcp hello_dcp.c dcp_examples.S diff --git a/divider/CMakeLists.txt b/divider/CMakeLists.txt index fd6a44b7b..d5ad0ac8e 100644 --- a/divider/CMakeLists.txt +++ b/divider/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../CMakeLists.txt) - project(divider C CXX ASM) - include(../CMakeLists.txt) -endif() - if (TARGET hardware_divider) add_executable(hello_divider hello_divider.c diff --git a/dma/channel_irq/CMakeLists.txt b/dma/channel_irq/CMakeLists.txt index 36b481fbf..25dc64e20 100644 --- a/dma/channel_irq/CMakeLists.txt +++ b/dma/channel_irq/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(channel_irq C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(dma_channel_irq channel_irq.c ) diff --git a/dma/control_blocks/CMakeLists.txt b/dma/control_blocks/CMakeLists.txt index a39ccf5e4..b551c7bfe 100644 --- a/dma/control_blocks/CMakeLists.txt +++ b/dma/control_blocks/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(control_blocks C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(dma_control_blocks control_blocks.c ) diff --git a/dma/hello_dma/CMakeLists.txt b/dma/hello_dma/CMakeLists.txt index 8950dbab5..b513a2eb8 100644 --- a/dma/hello_dma/CMakeLists.txt +++ b/dma/hello_dma/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_dma C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_dma hello_dma.c ) diff --git a/dma/sniff_crc/CMakeLists.txt b/dma/sniff_crc/CMakeLists.txt index 8da26fa47..6f72b5100 100644 --- a/dma/sniff_crc/CMakeLists.txt +++ b/dma/sniff_crc/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(sniff_crc C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(sniff_crc sniff_crc.c ) diff --git a/flash/cache_perfctr/CMakeLists.txt b/flash/cache_perfctr/CMakeLists.txt index ab18b694e..2d065a28e 100644 --- a/flash/cache_perfctr/CMakeLists.txt +++ b/flash/cache_perfctr/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(cache_perfctr C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_cache_perfctr flash_cache_perfctr.c ) diff --git a/flash/nuke/CMakeLists.txt b/flash/nuke/CMakeLists.txt index 0c84368de..c8ae47a94 100644 --- a/flash/nuke/CMakeLists.txt +++ b/flash/nuke/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(nuke C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_nuke nuke.c ) diff --git a/flash/program/CMakeLists.txt b/flash/program/CMakeLists.txt index 00b7e41c4..a17bb0ec0 100644 --- a/flash/program/CMakeLists.txt +++ b/flash/program/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(program C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_program flash_program.c ) diff --git a/flash/runtime_flash_permissions/CMakeLists.txt b/flash/runtime_flash_permissions/CMakeLists.txt index 1b27ff336..3eb6bdd94 100644 --- a/flash/runtime_flash_permissions/CMakeLists.txt +++ b/flash/runtime_flash_permissions/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(runtime_flash_permissions C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(runtime_flash_permissions runtime_flash_permissions.c ) diff --git a/flash/ssi_dma/CMakeLists.txt b/flash/ssi_dma/CMakeLists.txt index c2d3d98d7..965cc6098 100644 --- a/flash/ssi_dma/CMakeLists.txt +++ b/flash/ssi_dma/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(ssi_dma C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_ssi_dma flash_ssi_dma.c ) diff --git a/flash/xip_stream/CMakeLists.txt b/flash/xip_stream/CMakeLists.txt index ff7e5b6d2..bd8b6dd03 100644 --- a/flash/xip_stream/CMakeLists.txt +++ b/flash/xip_stream/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(xip_stream C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_xip_stream flash_xip_stream.c ) diff --git a/freertos/hello_freertos/CMakeLists.txt b/freertos/hello_freertos/CMakeLists.txt index d1f7e556a..1da0ce773 100644 --- a/freertos/hello_freertos/CMakeLists.txt +++ b/freertos/hello_freertos/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_freertos C CXX ASM) - include(../../CMakeLists.txt) -endif() - set(TARGET_NAME hello_freertos1) add_executable(${TARGET_NAME} hello_freertos.c diff --git a/gpio/dht_sensor/CMakeLists.txt b/gpio/dht_sensor/CMakeLists.txt index 302469cfd..33c72ea99 100644 --- a/gpio/dht_sensor/CMakeLists.txt +++ b/gpio/dht_sensor/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(dht_sensor C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(dht dht.c ) diff --git a/gpio/hello_7segment/CMakeLists.txt b/gpio/hello_7segment/CMakeLists.txt index e24fd9d70..d0ce3aecf 100644 --- a/gpio/hello_7segment/CMakeLists.txt +++ b/gpio/hello_7segment/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_7segment C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_7segment hello_7segment.c ) diff --git a/gpio/hello_gpio_irq/CMakeLists.txt b/gpio/hello_gpio_irq/CMakeLists.txt index 5bd7ffe16..e514cfbea 100644 --- a/gpio/hello_gpio_irq/CMakeLists.txt +++ b/gpio/hello_gpio_irq/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_gpio_irq C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_gpio_irq hello_gpio_irq.c ) diff --git a/hello_world/serial/CMakeLists.txt b/hello_world/serial/CMakeLists.txt index ca99bd5a2..7be690122 100644 --- a/hello_world/serial/CMakeLists.txt +++ b/hello_world/serial/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(serial C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_serial hello_serial.c ) diff --git a/hello_world/usb/CMakeLists.txt b/hello_world/usb/CMakeLists.txt index 3a0c43126..aa176eb93 100644 --- a/hello_world/usb/CMakeLists.txt +++ b/hello_world/usb/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(usb C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (TARGET tinyusb_device) add_executable(hello_usb hello_usb.c diff --git a/hstx/dvi_out_hstx_encoder/CMakeLists.txt b/hstx/dvi_out_hstx_encoder/CMakeLists.txt index a6875b455..4c9b3a345 100644 --- a/hstx/dvi_out_hstx_encoder/CMakeLists.txt +++ b/hstx/dvi_out_hstx_encoder/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(dvi_out_hstx_encoder C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(dvi_out_hstx_encoder dvi_out_hstx_encoder.c ) diff --git a/hstx/spi_lcd/CMakeLists.txt b/hstx/spi_lcd/CMakeLists.txt index 5f76b5330..7d8551ac0 100644 --- a/hstx/spi_lcd/CMakeLists.txt +++ b/hstx/spi_lcd/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(spi_lcd C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hstx_spi_lcd hstx_spi_lcd.c ) diff --git a/i2c/bmp280_i2c/CMakeLists.txt b/i2c/bmp280_i2c/CMakeLists.txt index 4ac64f2b8..c63a7baba 100644 --- a/i2c/bmp280_i2c/CMakeLists.txt +++ b/i2c/bmp280_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(bmp280_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(bmp280_i2c bmp280_i2c.c ) diff --git a/i2c/bus_scan/CMakeLists.txt b/i2c/bus_scan/CMakeLists.txt index a808e0a34..662cfe61b 100644 --- a/i2c/bus_scan/CMakeLists.txt +++ b/i2c/bus_scan/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(bus_scan C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(i2c_bus_scan bus_scan.c ) diff --git a/i2c/ht16k33_i2c/CMakeLists.txt b/i2c/ht16k33_i2c/CMakeLists.txt index 567bdebab..b9b1110fb 100644 --- a/i2c/ht16k33_i2c/CMakeLists.txt +++ b/i2c/ht16k33_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(ht16k33_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(ht16k33_i2c ht16k33_i2c.c ) diff --git a/i2c/lcd_1602_i2c/CMakeLists.txt b/i2c/lcd_1602_i2c/CMakeLists.txt index 5a2f0318c..c6aad7ae1 100644 --- a/i2c/lcd_1602_i2c/CMakeLists.txt +++ b/i2c/lcd_1602_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(lcd_1602_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(lcd_1602_i2c lcd_1602_i2c.c ) diff --git a/i2c/lis3dh_i2c/CMakeLists.txt b/i2c/lis3dh_i2c/CMakeLists.txt index b60d4d5d4..0b23c9043 100644 --- a/i2c/lis3dh_i2c/CMakeLists.txt +++ b/i2c/lis3dh_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(lis3dh_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(lis3dh_i2c lis3dh_i2c.c ) diff --git a/i2c/mcp9808_i2c/CMakeLists.txt b/i2c/mcp9808_i2c/CMakeLists.txt index 754c4226c..4ee1b4975 100644 --- a/i2c/mcp9808_i2c/CMakeLists.txt +++ b/i2c/mcp9808_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mcp9808_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mcp9808_i2c mcp9808_i2c.c ) diff --git a/i2c/mma8451_i2c/CMakeLists.txt b/i2c/mma8451_i2c/CMakeLists.txt index e570d9567..e3c1084d1 100644 --- a/i2c/mma8451_i2c/CMakeLists.txt +++ b/i2c/mma8451_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mma8451_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mma8451_i2c mma8451_i2c.c ) diff --git a/i2c/mpl3115a2_i2c/CMakeLists.txt b/i2c/mpl3115a2_i2c/CMakeLists.txt index 62a54af2a..db9a5d7b6 100644 --- a/i2c/mpl3115a2_i2c/CMakeLists.txt +++ b/i2c/mpl3115a2_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mpl3115a2_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mpl3115a2_i2c mpl3115a2_i2c.c ) diff --git a/i2c/mpu6050_i2c/CMakeLists.txt b/i2c/mpu6050_i2c/CMakeLists.txt index 0f981b1b6..83be3d51e 100644 --- a/i2c/mpu6050_i2c/CMakeLists.txt +++ b/i2c/mpu6050_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mpu6050_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mpu6050_i2c mpu6050_i2c.c ) diff --git a/i2c/pa1010d_i2c/CMakeLists.txt b/i2c/pa1010d_i2c/CMakeLists.txt index 60e6555b0..b04fac23f 100644 --- a/i2c/pa1010d_i2c/CMakeLists.txt +++ b/i2c/pa1010d_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(pa1010d_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pa1010d_i2c pa1010d_i2c.c ) diff --git a/i2c/pcf8523_i2c/CMakeLists.txt b/i2c/pcf8523_i2c/CMakeLists.txt index 4279fa82f..8d47635b3 100644 --- a/i2c/pcf8523_i2c/CMakeLists.txt +++ b/i2c/pcf8523_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(pcf8523_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pcf8523_i2c pcf8523_i2c.c ) diff --git a/i2c/slave_mem_i2c/CMakeLists.txt b/i2c/slave_mem_i2c/CMakeLists.txt index c8ea02cb1..449744447 100644 --- a/i2c/slave_mem_i2c/CMakeLists.txt +++ b/i2c/slave_mem_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(slave_mem_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(slave_mem_i2c slave_mem_i2c.c ) diff --git a/i2c/ssd1306_i2c/CMakeLists.txt b/i2c/ssd1306_i2c/CMakeLists.txt index fde9d06d5..25fabace1 100644 --- a/i2c/ssd1306_i2c/CMakeLists.txt +++ b/i2c/ssd1306_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(ssd1306_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(ssd1306_i2c ssd1306_i2c.c ) diff --git a/interp/hello_interp/CMakeLists.txt b/interp/hello_interp/CMakeLists.txt index 5eff3426b..05b176da7 100644 --- a/interp/hello_interp/CMakeLists.txt +++ b/interp/hello_interp/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_interp C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (TARGET hardware_interp) add_executable(hello_interp hello_interp.c diff --git a/multicore/hello_multicore/CMakeLists.txt b/multicore/hello_multicore/CMakeLists.txt index a124eb5b1..540d67948 100644 --- a/multicore/hello_multicore/CMakeLists.txt +++ b/multicore/hello_multicore/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_multicore C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_multicore multicore.c ) diff --git a/multicore/multicore_doorbell/CMakeLists.txt b/multicore/multicore_doorbell/CMakeLists.txt index 5f3147cbd..8e2493e18 100644 --- a/multicore/multicore_doorbell/CMakeLists.txt +++ b/multicore/multicore_doorbell/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(multicore_doorbell C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(multicore_doorbell multicore_doorbell.c ) diff --git a/multicore/multicore_fifo_irqs/CMakeLists.txt b/multicore/multicore_fifo_irqs/CMakeLists.txt index fc2d1e22b..aa1097e14 100644 --- a/multicore/multicore_fifo_irqs/CMakeLists.txt +++ b/multicore/multicore_fifo_irqs/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(multicore_fifo_irqs C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(multicore_fifo_irqs multicore_fifo_irqs.c ) diff --git a/multicore/multicore_runner/CMakeLists.txt b/multicore/multicore_runner/CMakeLists.txt index d36df9010..a96db31e0 100644 --- a/multicore/multicore_runner/CMakeLists.txt +++ b/multicore/multicore_runner/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(multicore_runner C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(multicore_runner multicore_runner.c ) diff --git a/multicore/multicore_runner_queue/CMakeLists.txt b/multicore/multicore_runner_queue/CMakeLists.txt index cde9bcfb3..c35368a78 100644 --- a/multicore/multicore_runner_queue/CMakeLists.txt +++ b/multicore/multicore_runner_queue/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(multicore_runner_queue C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(multicore_runner_queue multicore_runner_queue.c ) diff --git a/otp/hello_otp/CMakeLists.txt b/otp/hello_otp/CMakeLists.txt index b52be6a81..43397cd3e 100644 --- a/otp/hello_otp/CMakeLists.txt +++ b/otp/hello_otp/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_otp C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_otp hello_otp.c ) diff --git a/pico_w/bt/CMakeLists.txt b/pico_w/bt/CMakeLists.txt index 954080892..e14345398 100644 --- a/pico_w/bt/CMakeLists.txt +++ b/pico_w/bt/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(bt C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_subdirectory(standalone) set(BTSTACK_ROOT ${PICO_SDK_PATH}/lib/btstack) diff --git a/pico_w/bt/standalone/CMakeLists.txt b/pico_w/bt/standalone/CMakeLists.txt index 87f278362..28d20b687 100644 --- a/pico_w/bt/standalone/CMakeLists.txt +++ b/pico_w/bt/standalone/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(standalone C CXX ASM) - include(../../../CMakeLists.txt) -endif() - # Standalone example that reads from the on board temperature sensor and sends notifications via BLE # Flashes slowly each second to show it's running add_executable(picow_ble_temp_sensor diff --git a/pico_w/wifi/access_point/CMakeLists.txt b/pico_w/wifi/access_point/CMakeLists.txt index 77d1676ce..6bc0a2eb4 100644 --- a/pico_w/wifi/access_point/CMakeLists.txt +++ b/pico_w/wifi/access_point/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(access_point C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_access_point_background picow_access_point.c dhcpserver/dhcpserver.c diff --git a/pico_w/wifi/blink/CMakeLists.txt b/pico_w/wifi/blink/CMakeLists.txt index 60661477e..2b1e6bfd3 100644 --- a/pico_w/wifi/blink/CMakeLists.txt +++ b/pico_w/wifi/blink/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(blink C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_blink picow_blink.c ) diff --git a/pico_w/wifi/freertos/http_client/CMakeLists.txt b/pico_w/wifi/freertos/http_client/CMakeLists.txt index aa18264dc..2010621a9 100644 --- a/pico_w/wifi/freertos/http_client/CMakeLists.txt +++ b/pico_w/wifi/freertos/http_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(http_client C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - # This example is disabled as mbedtls uses too much stack, and Freertos SMP is problematic with # pico_cyw43_arch_lwip_threadsafe_background (nosys), where WiFi and LwIP activity is performed in an IRQ. # Prefer to use pico_cyw43_arch_lwip_sys_freertos instead, where WiFi and LwIP activity is performed in a thread. diff --git a/pico_w/wifi/freertos/httpd/CMakeLists.txt b/pico_w/wifi/freertos/httpd/CMakeLists.txt index 2f34f4362..35dd4eb35 100644 --- a/pico_w/wifi/freertos/httpd/CMakeLists.txt +++ b/pico_w/wifi/freertos/httpd/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(httpd C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) add_executable(pico_freertos_httpd_nosys diff --git a/pico_w/wifi/freertos/iperf/CMakeLists.txt b/pico_w/wifi/freertos/iperf/CMakeLists.txt index 7e4259de5..2cc17c560 100644 --- a/pico_w/wifi/freertos/iperf/CMakeLists.txt +++ b/pico_w/wifi/freertos/iperf/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(iperf C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - add_executable(picow_freertos_iperf_server_nosys picow_freertos_iperf.c ) diff --git a/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt b/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt index 5a0a0a394..3cb02d5f1 100644 --- a/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt +++ b/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(ntp_client_socket C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - add_executable(picow_freertos_ntp_client_socket picow_freertos_ntp_client_socket.c ) diff --git a/pico_w/wifi/freertos/ping/CMakeLists.txt b/pico_w/wifi/freertos/ping/CMakeLists.txt index debcdba16..1296e09bf 100644 --- a/pico_w/wifi/freertos/ping/CMakeLists.txt +++ b/pico_w/wifi/freertos/ping/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(ping C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - if (EXISTS ${PICO_LWIP_CONTRIB_PATH}/apps/ping/ping.c) add_executable(picow_freertos_ping_nosys picow_freertos_ping.c diff --git a/pico_w/wifi/http_client/CMakeLists.txt b/pico_w/wifi/http_client/CMakeLists.txt index 50f73f36c..a1be39398 100644 --- a/pico_w/wifi/http_client/CMakeLists.txt +++ b/pico_w/wifi/http_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(http_client C CXX ASM) - include(../../../CMakeLists.txt) -endif() - pico_add_library(example_lwip_http_util NOFLAG) target_sources(example_lwip_http_util INTERFACE ${CMAKE_CURRENT_LIST_DIR}/example_http_client_util.c diff --git a/pico_w/wifi/httpd/CMakeLists.txt b/pico_w/wifi/httpd/CMakeLists.txt index 4c4401114..f028ef6dd 100644 --- a/pico_w/wifi/httpd/CMakeLists.txt +++ b/pico_w/wifi/httpd/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(httpd C CXX ASM) - include(../../../CMakeLists.txt) -endif() - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) add_executable(picow_httpd_background diff --git a/pico_w/wifi/iperf/CMakeLists.txt b/pico_w/wifi/iperf/CMakeLists.txt index bc1f86b89..56a6a1b0a 100644 --- a/pico_w/wifi/iperf/CMakeLists.txt +++ b/pico_w/wifi/iperf/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(iperf C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_iperf_server_background picow_iperf.c ) diff --git a/pico_w/wifi/ntp_client/CMakeLists.txt b/pico_w/wifi/ntp_client/CMakeLists.txt index 0067a6be7..22a2e6354 100644 --- a/pico_w/wifi/ntp_client/CMakeLists.txt +++ b/pico_w/wifi/ntp_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(ntp_client C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_ntp_client_background picow_ntp_client.c ) diff --git a/pico_w/wifi/tcp_client/CMakeLists.txt b/pico_w/wifi/tcp_client/CMakeLists.txt index cc4bec906..0bb498a5c 100644 --- a/pico_w/wifi/tcp_client/CMakeLists.txt +++ b/pico_w/wifi/tcp_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(tcp_client C CXX ASM) - include(../../../CMakeLists.txt) -endif() - if (NOT TEST_TCP_SERVER_IP) message("Skipping tcp_client example as TEST_TCP_SERVER_IP is not defined") else() diff --git a/pico_w/wifi/tcp_server/CMakeLists.txt b/pico_w/wifi/tcp_server/CMakeLists.txt index b90e192f4..3e8a48471 100644 --- a/pico_w/wifi/tcp_server/CMakeLists.txt +++ b/pico_w/wifi/tcp_server/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(tcp_server C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_tcpip_server_background picow_tcp_server.c ) diff --git a/pico_w/wifi/tls_client/CMakeLists.txt b/pico_w/wifi/tls_client/CMakeLists.txt index 9f65fffe7..fdbe6c056 100644 --- a/pico_w/wifi/tls_client/CMakeLists.txt +++ b/pico_w/wifi/tls_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(tls_client C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_tls_client_background picow_tls_client.c tls_common.c diff --git a/pico_w/wifi/udp_beacon/CMakeLists.txt b/pico_w/wifi/udp_beacon/CMakeLists.txt index 5fc913943..59300eee4 100644 --- a/pico_w/wifi/udp_beacon/CMakeLists.txt +++ b/pico_w/wifi/udp_beacon/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(udp_beacon C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_udp_beacon_background picow_udp_beacon.c ) diff --git a/pico_w/wifi/wifi_scan/CMakeLists.txt b/pico_w/wifi/wifi_scan/CMakeLists.txt index ab755413d..ba0cd4f97 100644 --- a/pico_w/wifi/wifi_scan/CMakeLists.txt +++ b/pico_w/wifi/wifi_scan/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(wifi_scan C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_wifi_scan_background picow_wifi_scan.c ) diff --git a/picoboard/blinky/CMakeLists.txt b/picoboard/blinky/CMakeLists.txt index 51f0915d4..e3e57abc7 100644 --- a/picoboard/blinky/CMakeLists.txt +++ b/picoboard/blinky/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(blinky C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(picoboard_blinky blinky.c ) diff --git a/picoboard/button/CMakeLists.txt b/picoboard/button/CMakeLists.txt index 66ee07fef..c3ef5d726 100644 --- a/picoboard/button/CMakeLists.txt +++ b/picoboard/button/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(button C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(picoboard_button button.c ) diff --git a/pio/addition/CMakeLists.txt b/pio/addition/CMakeLists.txt index f01bcdaad..9ff90779e 100644 --- a/pio/addition/CMakeLists.txt +++ b/pio/addition/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(addition C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_addition) pico_generate_pio_header(pio_addition ${CMAKE_CURRENT_LIST_DIR}/addition.pio) diff --git a/pio/apa102/CMakeLists.txt b/pio/apa102/CMakeLists.txt index 4721e40ba..1522f5564 100644 --- a/pio/apa102/CMakeLists.txt +++ b/pio/apa102/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(apa102 C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_apa102) pico_generate_pio_header(pio_apa102 ${CMAKE_CURRENT_LIST_DIR}/apa102.pio) diff --git a/pio/clocked_input/CMakeLists.txt b/pio/clocked_input/CMakeLists.txt index 9a0b7b2da..cd71408a3 100644 --- a/pio/clocked_input/CMakeLists.txt +++ b/pio/clocked_input/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(clocked_input C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_clocked_input) pico_generate_pio_header(pio_clocked_input ${CMAKE_CURRENT_LIST_DIR}/clocked_input.pio) diff --git a/pio/differential_manchester/CMakeLists.txt b/pio/differential_manchester/CMakeLists.txt index 0725bcbef..6276f09f5 100644 --- a/pio/differential_manchester/CMakeLists.txt +++ b/pio/differential_manchester/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(differential_manchester C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_differential_manchester) pico_generate_pio_header(pio_differential_manchester ${CMAKE_CURRENT_LIST_DIR}/differential_manchester.pio) diff --git a/pio/hello_pio/CMakeLists.txt b/pio/hello_pio/CMakeLists.txt index e10bf1a29..1c1d67496 100644 --- a/pio/hello_pio/CMakeLists.txt +++ b/pio/hello_pio/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_pio C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_pio) pico_generate_pio_header(hello_pio ${CMAKE_CURRENT_LIST_DIR}/hello.pio) diff --git a/pio/hub75/CMakeLists.txt b/pio/hub75/CMakeLists.txt index 0cd6d7643..a976f4eab 100644 --- a/pio/hub75/CMakeLists.txt +++ b/pio/hub75/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hub75 C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_hub75) pico_generate_pio_header(pio_hub75 ${CMAKE_CURRENT_LIST_DIR}/hub75.pio) diff --git a/pio/i2c/CMakeLists.txt b/pio/i2c/CMakeLists.txt index 05e7a423f..d49b22482 100644 --- a/pio/i2c/CMakeLists.txt +++ b/pio/i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_i2c_bus_scan) pico_generate_pio_header(pio_i2c_bus_scan ${CMAKE_CURRENT_LIST_DIR}/i2c.pio) diff --git a/pio/ir_nec/ir_loopback/CMakeLists.txt b/pio/ir_nec/ir_loopback/CMakeLists.txt index c84ef8d99..8c7d8f4b7 100644 --- a/pio/ir_nec/ir_loopback/CMakeLists.txt +++ b/pio/ir_nec/ir_loopback/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(ir_loopback C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable (pio_ir_loopback ir_loopback.c) # link the executable using the IR transmit and receive libraries diff --git a/pio/logic_analyser/CMakeLists.txt b/pio/logic_analyser/CMakeLists.txt index 1e78df9ae..8a65198a9 100644 --- a/pio/logic_analyser/CMakeLists.txt +++ b/pio/logic_analyser/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(logic_analyser C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_logic_analyser) target_sources(pio_logic_analyser PRIVATE logic_analyser.c) diff --git a/pio/manchester_encoding/CMakeLists.txt b/pio/manchester_encoding/CMakeLists.txt index 4c165cfa2..70b88283a 100644 --- a/pio/manchester_encoding/CMakeLists.txt +++ b/pio/manchester_encoding/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(manchester_encoding C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_manchester_encoding) pico_generate_pio_header(pio_manchester_encoding ${CMAKE_CURRENT_LIST_DIR}/manchester_encoding.pio) diff --git a/pio/onewire/CMakeLists.txt b/pio/onewire/CMakeLists.txt index aca566dc2..4090cb36c 100644 --- a/pio/onewire/CMakeLists.txt +++ b/pio/onewire/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(onewire C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_onewire) target_sources(pio_onewire PRIVATE onewire.c) diff --git a/pio/pio_blink/CMakeLists.txt b/pio/pio_blink/CMakeLists.txt index f9c961fa3..88b5584fd 100644 --- a/pio/pio_blink/CMakeLists.txt +++ b/pio/pio_blink/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(pio_blink C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_blink) # by default the header is generated into the build dir diff --git a/pio/pwm/CMakeLists.txt b/pio/pwm/CMakeLists.txt index 506f32670..7c6f2fc01 100644 --- a/pio/pwm/CMakeLists.txt +++ b/pio/pwm/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(pwm C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_pwm) pico_generate_pio_header(pio_pwm ${CMAKE_CURRENT_LIST_DIR}/pwm.pio) diff --git a/pio/quadrature_encoder/CMakeLists.txt b/pio/quadrature_encoder/CMakeLists.txt index 6b59240cf..b118f3c27 100644 --- a/pio/quadrature_encoder/CMakeLists.txt +++ b/pio/quadrature_encoder/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(quadrature_encoder C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_quadrature_encoder) pico_generate_pio_header(pio_quadrature_encoder ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder.pio) diff --git a/pio/quadrature_encoder_substep/CMakeLists.txt b/pio/quadrature_encoder_substep/CMakeLists.txt index abebad841..7bc7f6a0a 100644 --- a/pio/quadrature_encoder_substep/CMakeLists.txt +++ b/pio/quadrature_encoder_substep/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(quadrature_encoder_substep C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_quadrature_encoder_substep) pico_generate_pio_header(pio_quadrature_encoder_substep ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder_substep.pio) diff --git a/pio/spi/CMakeLists.txt b/pio/spi/CMakeLists.txt index d413abb51..44c561a85 100644 --- a/pio/spi/CMakeLists.txt +++ b/pio/spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_spi_flash) pico_generate_pio_header(pio_spi_flash ${CMAKE_CURRENT_LIST_DIR}/spi.pio) diff --git a/pio/squarewave/CMakeLists.txt b/pio/squarewave/CMakeLists.txt index 6e4795c14..fe503bb1d 100644 --- a/pio/squarewave/CMakeLists.txt +++ b/pio/squarewave/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(squarewave C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_squarewave) pico_generate_pio_header(pio_squarewave ${CMAKE_CURRENT_LIST_DIR}/squarewave.pio) diff --git a/pio/st7789_lcd/CMakeLists.txt b/pio/st7789_lcd/CMakeLists.txt index 996b92274..a6243e646 100644 --- a/pio/st7789_lcd/CMakeLists.txt +++ b/pio/st7789_lcd/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(st7789_lcd C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_st7789_lcd) pico_generate_pio_header(pio_st7789_lcd ${CMAKE_CURRENT_LIST_DIR}/st7789_lcd.pio) diff --git a/pio/uart_rx/CMakeLists.txt b/pio/uart_rx/CMakeLists.txt index a9069ad6b..5f985e1bb 100644 --- a/pio/uart_rx/CMakeLists.txt +++ b/pio/uart_rx/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(uart_rx C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_uart_rx) pico_generate_pio_header(pio_uart_rx ${CMAKE_CURRENT_LIST_DIR}/uart_rx.pio) diff --git a/pio/uart_tx/CMakeLists.txt b/pio/uart_tx/CMakeLists.txt index c54a6b543..5e3cf2a82 100644 --- a/pio/uart_tx/CMakeLists.txt +++ b/pio/uart_tx/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(uart_tx C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_uart_tx) pico_generate_pio_header(pio_uart_tx ${CMAKE_CURRENT_LIST_DIR}/uart_tx.pio) diff --git a/pio/ws2812/CMakeLists.txt b/pio/ws2812/CMakeLists.txt index 94baddf4f..3e887b908 100644 --- a/pio/ws2812/CMakeLists.txt +++ b/pio/ws2812/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(ws2812 C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_ws2812) file(MAKE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/generated) diff --git a/pwm/hello_pwm/CMakeLists.txt b/pwm/hello_pwm/CMakeLists.txt index 6a9796517..e2df80ceb 100644 --- a/pwm/hello_pwm/CMakeLists.txt +++ b/pwm/hello_pwm/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_pwm C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_pwm hello_pwm.c ) diff --git a/pwm/led_fade/CMakeLists.txt b/pwm/led_fade/CMakeLists.txt index 874aaa918..a9f5eea56 100644 --- a/pwm/led_fade/CMakeLists.txt +++ b/pwm/led_fade/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(led_fade C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pwm_led_fade pwm_led_fade.c ) diff --git a/pwm/measure_duty_cycle/CMakeLists.txt b/pwm/measure_duty_cycle/CMakeLists.txt index 8be5b92f7..45bd4d623 100644 --- a/pwm/measure_duty_cycle/CMakeLists.txt +++ b/pwm/measure_duty_cycle/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(measure_duty_cycle C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pwm_measure_duty_cycle measure_duty_cycle.c ) diff --git a/reset/hello_reset/CMakeLists.txt b/reset/hello_reset/CMakeLists.txt index 192bf0ed5..fc0854377 100644 --- a/reset/hello_reset/CMakeLists.txt +++ b/reset/hello_reset/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_reset C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (TARGET hardware_resets) add_executable(hello_reset hello_reset.c diff --git a/rtc/hello_rtc/CMakeLists.txt b/rtc/hello_rtc/CMakeLists.txt index a7f106a48..b3cc1a25c 100644 --- a/rtc/hello_rtc/CMakeLists.txt +++ b/rtc/hello_rtc/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_rtc C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_rtc hello_rtc.c ) diff --git a/rtc/rtc_alarm/CMakeLists.txt b/rtc/rtc_alarm/CMakeLists.txt index b5952b5ab..8f0dfa2cb 100644 --- a/rtc/rtc_alarm/CMakeLists.txt +++ b/rtc/rtc_alarm/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(rtc_alarm C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(rtc_alarm rtc_alarm.c ) diff --git a/rtc/rtc_alarm_repeat/CMakeLists.txt b/rtc/rtc_alarm_repeat/CMakeLists.txt index abaa12f05..bd3c9e3e0 100644 --- a/rtc/rtc_alarm_repeat/CMakeLists.txt +++ b/rtc/rtc_alarm_repeat/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(rtc_alarm_repeat C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(rtc_alarm_repeat rtc_alarm_repeat.c ) diff --git a/sha/mbedtls_sha256/CMakeLists.txt b/sha/mbedtls_sha256/CMakeLists.txt index 96f1ababa..a9bec5d18 100644 --- a/sha/mbedtls_sha256/CMakeLists.txt +++ b/sha/mbedtls_sha256/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mbedtls_sha256 C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (NOT TARGET hardware_sha256) return() endif() diff --git a/sha/sha256/CMakeLists.txt b/sha/sha256/CMakeLists.txt index 55d5108aa..5835fe863 100644 --- a/sha/sha256/CMakeLists.txt +++ b/sha/sha256/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(sha256 C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (NOT TARGET hardware_sha256) return() endif() diff --git a/spi/bme280_spi/CMakeLists.txt b/spi/bme280_spi/CMakeLists.txt index d0646afc5..117d01a51 100644 --- a/spi/bme280_spi/CMakeLists.txt +++ b/spi/bme280_spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(bme280_spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(bme280_spi bme280_spi.c ) diff --git a/spi/max7219_32x8_spi/CMakeLists.txt b/spi/max7219_32x8_spi/CMakeLists.txt index 2bb83127b..415eb33f3 100644 --- a/spi/max7219_32x8_spi/CMakeLists.txt +++ b/spi/max7219_32x8_spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(max7219_32x8_spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(max7219_32x8_spi max7219_32x8_spi.c ) diff --git a/spi/max7219_8x7seg_spi/CMakeLists.txt b/spi/max7219_8x7seg_spi/CMakeLists.txt index c3255dad4..ab0b08c12 100644 --- a/spi/max7219_8x7seg_spi/CMakeLists.txt +++ b/spi/max7219_8x7seg_spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(max7219_8x7seg_spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(max7219_8x7seg_spi max7219_8x7seg_spi.c ) diff --git a/spi/mpu9250_spi/CMakeLists.txt b/spi/mpu9250_spi/CMakeLists.txt index cc907c35c..5e0a6120a 100644 --- a/spi/mpu9250_spi/CMakeLists.txt +++ b/spi/mpu9250_spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mpu9250_spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mpu9250_spi mpu9250_spi.c ) diff --git a/spi/spi_dma/CMakeLists.txt b/spi/spi_dma/CMakeLists.txt index a4a1bef5e..3adfdda60 100644 --- a/spi/spi_dma/CMakeLists.txt +++ b/spi/spi_dma/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(spi_dma C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(spi_dma spi_dma.c ) diff --git a/spi/spi_flash/CMakeLists.txt b/spi/spi_flash/CMakeLists.txt index a5e534293..2a0ddcc35 100644 --- a/spi/spi_flash/CMakeLists.txt +++ b/spi/spi_flash/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(spi_flash C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(spi_flash spi_flash.c ) diff --git a/spi/spi_master_slave/spi_master/CMakeLists.txt b/spi/spi_master_slave/spi_master/CMakeLists.txt index 8a74737f5..534e78fd6 100644 --- a/spi/spi_master_slave/spi_master/CMakeLists.txt +++ b/spi/spi_master_slave/spi_master/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(spi_master C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(spi_master spi_master.c ) diff --git a/spi/spi_master_slave/spi_slave/CMakeLists.txt b/spi/spi_master_slave/spi_slave/CMakeLists.txt index b1ed04089..8e0564506 100644 --- a/spi/spi_master_slave/spi_slave/CMakeLists.txt +++ b/spi/spi_master_slave/spi_slave/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(spi_slave C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(spi_slave spi_slave.c ) diff --git a/system/boot_info/CMakeLists.txt b/system/boot_info/CMakeLists.txt index 752472c07..ec166f968 100644 --- a/system/boot_info/CMakeLists.txt +++ b/system/boot_info/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(boot_info C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(boot_info boot_info.c ) diff --git a/system/hello_double_tap/CMakeLists.txt b/system/hello_double_tap/CMakeLists.txt index eeed3b78f..30a9e12f7 100644 --- a/system/hello_double_tap/CMakeLists.txt +++ b/system/hello_double_tap/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_double_tap C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_double_tap hello_double_tap.c ) diff --git a/system/narrow_io_write/CMakeLists.txt b/system/narrow_io_write/CMakeLists.txt index a13cce156..5e57819d7 100644 --- a/system/narrow_io_write/CMakeLists.txt +++ b/system/narrow_io_write/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(narrow_io_write C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(narrow_io_write narrow_io_write.c ) diff --git a/system/rand/CMakeLists.txt b/system/rand/CMakeLists.txt index dc9334780..f874c9f78 100644 --- a/system/rand/CMakeLists.txt +++ b/system/rand/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(rand C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(rand rand.c ) diff --git a/system/unique_board_id/CMakeLists.txt b/system/unique_board_id/CMakeLists.txt index e80648f17..1a5b1f989 100644 --- a/system/unique_board_id/CMakeLists.txt +++ b/system/unique_board_id/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(unique_board_id C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(unique_board_id unique_board_id.c ) diff --git a/timer/hello_timer/CMakeLists.txt b/timer/hello_timer/CMakeLists.txt index 30eacc0ad..806cf699f 100644 --- a/timer/hello_timer/CMakeLists.txt +++ b/timer/hello_timer/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_timer C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_timer hello_timer.c ) diff --git a/timer/periodic_sampler/CMakeLists.txt b/timer/periodic_sampler/CMakeLists.txt index d5f8af67a..284780fb3 100644 --- a/timer/periodic_sampler/CMakeLists.txt +++ b/timer/periodic_sampler/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(periodic_sampler C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (NOT PICO_TIME_NO_ALARM_SUPPORT) add_executable(periodic_sampler periodic_sampler.c diff --git a/timer/timer_lowlevel/CMakeLists.txt b/timer/timer_lowlevel/CMakeLists.txt index 3cee215dd..55d4e82aa 100644 --- a/timer/timer_lowlevel/CMakeLists.txt +++ b/timer/timer_lowlevel/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(timer_lowlevel C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (PICO_ON_DEVICE) add_executable(timer_lowlevel timer_lowlevel.c) diff --git a/uart/hello_uart/CMakeLists.txt b/uart/hello_uart/CMakeLists.txt index d072dd550..0931f384d 100644 --- a/uart/hello_uart/CMakeLists.txt +++ b/uart/hello_uart/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_uart C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_uart hello_uart.c ) diff --git a/uart/lcd_uart/CMakeLists.txt b/uart/lcd_uart/CMakeLists.txt index a82f9a472..64098821f 100644 --- a/uart/lcd_uart/CMakeLists.txt +++ b/uart/lcd_uart/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(lcd_uart C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(lcd_uart lcd_uart.c ) diff --git a/uart/uart_advanced/CMakeLists.txt b/uart/uart_advanced/CMakeLists.txt index fdf1cb569..a7cf5638e 100644 --- a/uart/uart_advanced/CMakeLists.txt +++ b/uart/uart_advanced/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(uart_advanced C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(uart_advanced uart_advanced.c ) diff --git a/universal/hello_universal/CMakeLists.txt b/universal/hello_universal/CMakeLists.txt index 00dbde3e6..51269beac 100644 --- a/universal/hello_universal/CMakeLists.txt +++ b/universal/hello_universal/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_universal C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_universal hello_universal.c ) diff --git a/usb/device/dev_hid_composite/CMakeLists.txt b/usb/device/dev_hid_composite/CMakeLists.txt index e0abfc849..cd035d9a5 100644 --- a/usb/device/dev_hid_composite/CMakeLists.txt +++ b/usb/device/dev_hid_composite/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(dev_hid_composite C CXX ASM) - include(../../../CMakeLists.txt) -endif() - cmake_minimum_required(VERSION 3.13) add_executable(dev_hid_composite) diff --git a/usb/device/dev_lowlevel/CMakeLists.txt b/usb/device/dev_lowlevel/CMakeLists.txt index d751400c1..906c84e5f 100644 --- a/usb/device/dev_lowlevel/CMakeLists.txt +++ b/usb/device/dev_lowlevel/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(dev_lowlevel C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(dev_lowlevel dev_lowlevel.c ) diff --git a/usb/host/host_cdc_msc_hid/CMakeLists.txt b/usb/host/host_cdc_msc_hid/CMakeLists.txt index 385201219..55f5a4a98 100644 --- a/usb/host/host_cdc_msc_hid/CMakeLists.txt +++ b/usb/host/host_cdc_msc_hid/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(host_cdc_msc_hid C CXX ASM) - include(../../../CMakeLists.txt) -endif() - cmake_minimum_required(VERSION 3.13) add_executable(host_cdc_msc_hid) diff --git a/watchdog/hello_watchdog/CMakeLists.txt b/watchdog/hello_watchdog/CMakeLists.txt index c6340863a..9e1e5d006 100644 --- a/watchdog/hello_watchdog/CMakeLists.txt +++ b/watchdog/hello_watchdog/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_watchdog C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_watchdog hello_watchdog.c ) From 099dc45b8c62853f3f121bf9b5f6f17b83401d34 Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Wed, 5 Feb 2025 10:58:56 +0000 Subject: [PATCH 3/3] Alternative approach with more spiel This approach adds more spiel to each project CMakeLists.txt, but means that you can just copy an example folder elsewhere, add a pico_sdk_import.cmake file, and then compile it as normal. --- adc/adc_console/CMakeLists.txt | 26 +++++++++++++++++++ adc/dma_capture/CMakeLists.txt | 26 +++++++++++++++++++ adc/hello_adc/CMakeLists.txt | 26 +++++++++++++++++++ adc/joystick_display/CMakeLists.txt | 26 +++++++++++++++++++ adc/microphone_adc/CMakeLists.txt | 26 +++++++++++++++++++ adc/onboard_temperature/CMakeLists.txt | 26 +++++++++++++++++++ adc/read_vsys/CMakeLists.txt | 26 +++++++++++++++++++ binary_info/blink_any/CMakeLists.txt | 26 +++++++++++++++++++ binary_info/hello_anything/CMakeLists.txt | 26 +++++++++++++++++++ blink/CMakeLists.txt | 26 +++++++++++++++++++ blink_simple/CMakeLists.txt | 26 +++++++++++++++++++ bootloaders/encrypted/CMakeLists.txt | 26 +++++++++++++++++++ clocks/detached_clk_peri/CMakeLists.txt | 26 +++++++++++++++++++ clocks/hello_48MHz/CMakeLists.txt | 26 +++++++++++++++++++ clocks/hello_gpout/CMakeLists.txt | 26 +++++++++++++++++++ clocks/hello_resus/CMakeLists.txt | 26 +++++++++++++++++++ cmake/build_variants/CMakeLists.txt | 26 +++++++++++++++++++ dcp/hello_dcp/CMakeLists.txt | 26 +++++++++++++++++++ divider/CMakeLists.txt | 26 +++++++++++++++++++ dma/channel_irq/CMakeLists.txt | 26 +++++++++++++++++++ dma/control_blocks/CMakeLists.txt | 26 +++++++++++++++++++ dma/hello_dma/CMakeLists.txt | 26 +++++++++++++++++++ dma/sniff_crc/CMakeLists.txt | 26 +++++++++++++++++++ flash/cache_perfctr/CMakeLists.txt | 26 +++++++++++++++++++ flash/nuke/CMakeLists.txt | 26 +++++++++++++++++++ flash/program/CMakeLists.txt | 26 +++++++++++++++++++ .../runtime_flash_permissions/CMakeLists.txt | 26 +++++++++++++++++++ flash/ssi_dma/CMakeLists.txt | 26 +++++++++++++++++++ flash/xip_stream/CMakeLists.txt | 26 +++++++++++++++++++ freertos/hello_freertos/CMakeLists.txt | 26 +++++++++++++++++++ gpio/dht_sensor/CMakeLists.txt | 26 +++++++++++++++++++ gpio/hello_7segment/CMakeLists.txt | 26 +++++++++++++++++++ gpio/hello_gpio_irq/CMakeLists.txt | 26 +++++++++++++++++++ hello_world/serial/CMakeLists.txt | 26 +++++++++++++++++++ hello_world/usb/CMakeLists.txt | 26 +++++++++++++++++++ hstx/dvi_out_hstx_encoder/CMakeLists.txt | 26 +++++++++++++++++++ hstx/spi_lcd/CMakeLists.txt | 26 +++++++++++++++++++ i2c/bmp280_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/bus_scan/CMakeLists.txt | 26 +++++++++++++++++++ i2c/ht16k33_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/lcd_1602_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/lis3dh_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/mcp9808_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/mma8451_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/mpl3115a2_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/mpu6050_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/pa1010d_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/pcf8523_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/slave_mem_i2c/CMakeLists.txt | 26 +++++++++++++++++++ i2c/ssd1306_i2c/CMakeLists.txt | 26 +++++++++++++++++++ interp/hello_interp/CMakeLists.txt | 26 +++++++++++++++++++ multicore/hello_multicore/CMakeLists.txt | 26 +++++++++++++++++++ multicore/multicore_doorbell/CMakeLists.txt | 26 +++++++++++++++++++ multicore/multicore_fifo_irqs/CMakeLists.txt | 26 +++++++++++++++++++ multicore/multicore_runner/CMakeLists.txt | 26 +++++++++++++++++++ .../multicore_runner_queue/CMakeLists.txt | 26 +++++++++++++++++++ otp/hello_otp/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/bt/standalone/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/access_point/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/blink/CMakeLists.txt | 26 +++++++++++++++++++ .../wifi/freertos/http_client/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/freertos/httpd/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/freertos/iperf/CMakeLists.txt | 26 +++++++++++++++++++ .../freertos/ntp_client_socket/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/freertos/ping/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/http_client/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/httpd/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/iperf/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/ntp_client/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/tcp_client/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/tcp_server/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/tls_client/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/udp_beacon/CMakeLists.txt | 26 +++++++++++++++++++ pico_w/wifi/wifi_scan/CMakeLists.txt | 26 +++++++++++++++++++ picoboard/blinky/CMakeLists.txt | 26 +++++++++++++++++++ picoboard/button/CMakeLists.txt | 26 +++++++++++++++++++ pio/addition/CMakeLists.txt | 26 +++++++++++++++++++ pio/apa102/CMakeLists.txt | 26 +++++++++++++++++++ pio/clocked_input/CMakeLists.txt | 26 +++++++++++++++++++ pio/differential_manchester/CMakeLists.txt | 26 +++++++++++++++++++ pio/hello_pio/CMakeLists.txt | 26 +++++++++++++++++++ pio/hub75/CMakeLists.txt | 26 +++++++++++++++++++ pio/i2c/CMakeLists.txt | 26 +++++++++++++++++++ pio/ir_nec/ir_loopback/CMakeLists.txt | 26 +++++++++++++++++++ pio/logic_analyser/CMakeLists.txt | 26 +++++++++++++++++++ pio/manchester_encoding/CMakeLists.txt | 26 +++++++++++++++++++ pio/onewire/CMakeLists.txt | 26 +++++++++++++++++++ pio/pio_blink/CMakeLists.txt | 26 +++++++++++++++++++ pio/pwm/CMakeLists.txt | 26 +++++++++++++++++++ pio/quadrature_encoder/CMakeLists.txt | 26 +++++++++++++++++++ pio/quadrature_encoder_substep/CMakeLists.txt | 26 +++++++++++++++++++ pio/spi/CMakeLists.txt | 26 +++++++++++++++++++ pio/squarewave/CMakeLists.txt | 26 +++++++++++++++++++ pio/st7789_lcd/CMakeLists.txt | 26 +++++++++++++++++++ pio/uart_rx/CMakeLists.txt | 26 +++++++++++++++++++ pio/uart_tx/CMakeLists.txt | 26 +++++++++++++++++++ pio/ws2812/CMakeLists.txt | 26 +++++++++++++++++++ pwm/hello_pwm/CMakeLists.txt | 26 +++++++++++++++++++ pwm/led_fade/CMakeLists.txt | 26 +++++++++++++++++++ pwm/measure_duty_cycle/CMakeLists.txt | 26 +++++++++++++++++++ reset/hello_reset/CMakeLists.txt | 26 +++++++++++++++++++ rtc/hello_rtc/CMakeLists.txt | 26 +++++++++++++++++++ rtc/rtc_alarm/CMakeLists.txt | 26 +++++++++++++++++++ rtc/rtc_alarm_repeat/CMakeLists.txt | 26 +++++++++++++++++++ sha/mbedtls_sha256/CMakeLists.txt | 26 +++++++++++++++++++ sha/sha256/CMakeLists.txt | 26 +++++++++++++++++++ spi/bme280_spi/CMakeLists.txt | 26 +++++++++++++++++++ spi/max7219_32x8_spi/CMakeLists.txt | 26 +++++++++++++++++++ spi/max7219_8x7seg_spi/CMakeLists.txt | 26 +++++++++++++++++++ spi/mpu9250_spi/CMakeLists.txt | 26 +++++++++++++++++++ spi/spi_dma/CMakeLists.txt | 26 +++++++++++++++++++ spi/spi_flash/CMakeLists.txt | 26 +++++++++++++++++++ .../spi_master/CMakeLists.txt | 26 +++++++++++++++++++ spi/spi_master_slave/spi_slave/CMakeLists.txt | 26 +++++++++++++++++++ system/boot_info/CMakeLists.txt | 26 +++++++++++++++++++ system/hello_double_tap/CMakeLists.txt | 26 +++++++++++++++++++ system/narrow_io_write/CMakeLists.txt | 26 +++++++++++++++++++ system/rand/CMakeLists.txt | 26 +++++++++++++++++++ system/unique_board_id/CMakeLists.txt | 26 +++++++++++++++++++ timer/hello_timer/CMakeLists.txt | 26 +++++++++++++++++++ timer/periodic_sampler/CMakeLists.txt | 26 +++++++++++++++++++ timer/timer_lowlevel/CMakeLists.txt | 26 +++++++++++++++++++ uart/hello_uart/CMakeLists.txt | 26 +++++++++++++++++++ uart/lcd_uart/CMakeLists.txt | 26 +++++++++++++++++++ uart/uart_advanced/CMakeLists.txt | 26 +++++++++++++++++++ universal/hello_universal/CMakeLists.txt | 26 +++++++++++++++++++ usb/device/dev_hid_composite/CMakeLists.txt | 26 +++++++++++++++++++ usb/device/dev_lowlevel/CMakeLists.txt | 26 +++++++++++++++++++ usb/host/host_cdc_msc_hid/CMakeLists.txt | 26 +++++++++++++++++++ watchdog/hello_watchdog/CMakeLists.txt | 26 +++++++++++++++++++ 130 files changed, 3380 insertions(+) diff --git a/adc/adc_console/CMakeLists.txt b/adc/adc_console/CMakeLists.txt index 944a93d2d..c4cf950f7 100644 --- a/adc/adc_console/CMakeLists.txt +++ b/adc/adc_console/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(adc_console C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(adc_console adc_console.c ) diff --git a/adc/dma_capture/CMakeLists.txt b/adc/dma_capture/CMakeLists.txt index ff965e9db..b402213b5 100644 --- a/adc/dma_capture/CMakeLists.txt +++ b/adc/dma_capture/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(dma_capture C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(adc_dma_capture dma_capture.c ) diff --git a/adc/hello_adc/CMakeLists.txt b/adc/hello_adc/CMakeLists.txt index 186318246..5c22b3cb3 100644 --- a/adc/hello_adc/CMakeLists.txt +++ b/adc/hello_adc/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_adc C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_adc hello_adc.c ) diff --git a/adc/joystick_display/CMakeLists.txt b/adc/joystick_display/CMakeLists.txt index 96bb475ad..f1074ba5e 100644 --- a/adc/joystick_display/CMakeLists.txt +++ b/adc/joystick_display/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(joystick_display C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(joystick_display joystick_display.c ) diff --git a/adc/microphone_adc/CMakeLists.txt b/adc/microphone_adc/CMakeLists.txt index 87f2c4029..f3a6a2f26 100644 --- a/adc/microphone_adc/CMakeLists.txt +++ b/adc/microphone_adc/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(microphone_adc C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(microphone_adc microphone_adc.c ) diff --git a/adc/onboard_temperature/CMakeLists.txt b/adc/onboard_temperature/CMakeLists.txt index 1557ed234..328410402 100644 --- a/adc/onboard_temperature/CMakeLists.txt +++ b/adc/onboard_temperature/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(onboard_temperature C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(onboard_temperature onboard_temperature.c) target_link_libraries(onboard_temperature pico_stdlib hardware_adc) diff --git a/adc/read_vsys/CMakeLists.txt b/adc/read_vsys/CMakeLists.txt index 67535bd72..57968b5bd 100644 --- a/adc/read_vsys/CMakeLists.txt +++ b/adc/read_vsys/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(read_vsys C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_library(power_status_adc INTERFACE) target_sources(power_status_adc INTERFACE ${CMAKE_CURRENT_LIST_DIR}/power_status.c diff --git a/binary_info/blink_any/CMakeLists.txt b/binary_info/blink_any/CMakeLists.txt index de0401993..046de8a97 100644 --- a/binary_info/blink_any/CMakeLists.txt +++ b/binary_info/blink_any/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(blink_any C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (NOT PICO_CYW43_SUPPORTED) message("Only building blink_any for non W boards as PICO_CYW43_SUPPORTED is not set") endif() diff --git a/binary_info/hello_anything/CMakeLists.txt b/binary_info/hello_anything/CMakeLists.txt index 13aa84380..027f89336 100644 --- a/binary_info/hello_anything/CMakeLists.txt +++ b/binary_info/hello_anything/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_anything C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (TARGET tinyusb_device) add_executable(hello_anything hello_anything.c diff --git a/blink/CMakeLists.txt b/blink/CMakeLists.txt index 6308572d4..ef538bf8d 100644 --- a/blink/CMakeLists.txt +++ b/blink/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(blink C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(blink blink.c ) diff --git a/blink_simple/CMakeLists.txt b/blink_simple/CMakeLists.txt index 0d7c0cb44..e6b583470 100644 --- a/blink_simple/CMakeLists.txt +++ b/blink_simple/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(blink_simple C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(blink_simple blink_simple.c ) diff --git a/bootloaders/encrypted/CMakeLists.txt b/bootloaders/encrypted/CMakeLists.txt index f29f0efe2..683c073af 100644 --- a/bootloaders/encrypted/CMakeLists.txt +++ b/bootloaders/encrypted/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(encrypted C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + # Encrypted Bootloader add_executable(enc_bootloader enc_bootloader.c diff --git a/clocks/detached_clk_peri/CMakeLists.txt b/clocks/detached_clk_peri/CMakeLists.txt index d3dc75e01..142ca8bba 100644 --- a/clocks/detached_clk_peri/CMakeLists.txt +++ b/clocks/detached_clk_peri/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(detached_clk_peri C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(clocks_detached_clk_peri detached_clk_peri.c ) diff --git a/clocks/hello_48MHz/CMakeLists.txt b/clocks/hello_48MHz/CMakeLists.txt index 3ca96fc52..d707ceecf 100644 --- a/clocks/hello_48MHz/CMakeLists.txt +++ b/clocks/hello_48MHz/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_48MHz C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_48MHz hello_48MHz.c ) diff --git a/clocks/hello_gpout/CMakeLists.txt b/clocks/hello_gpout/CMakeLists.txt index 057ec3c5f..03e9741dc 100644 --- a/clocks/hello_gpout/CMakeLists.txt +++ b/clocks/hello_gpout/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_gpout C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_gpout hello_gpout.c ) diff --git a/clocks/hello_resus/CMakeLists.txt b/clocks/hello_resus/CMakeLists.txt index 9d4522e94..cde315c69 100644 --- a/clocks/hello_resus/CMakeLists.txt +++ b/clocks/hello_resus/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_resus C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_resus hello_resus.c ) diff --git a/cmake/build_variants/CMakeLists.txt b/cmake/build_variants/CMakeLists.txt index f40f80625..bfbcff570 100644 --- a/cmake/build_variants/CMakeLists.txt +++ b/cmake/build_variants/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(build_variants C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + # 1 Create an INTERFACE library aggregating all the common parts of the application add_library(common_stuff INTERFACE) diff --git a/dcp/hello_dcp/CMakeLists.txt b/dcp/hello_dcp/CMakeLists.txt index 2235fb271..e3def52d0 100644 --- a/dcp/hello_dcp/CMakeLists.txt +++ b/dcp/hello_dcp/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_dcp C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_dcp hello_dcp.c dcp_examples.S diff --git a/divider/CMakeLists.txt b/divider/CMakeLists.txt index d5ad0ac8e..b17d40fcc 100644 --- a/divider/CMakeLists.txt +++ b/divider/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(divider C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (TARGET hardware_divider) add_executable(hello_divider hello_divider.c diff --git a/dma/channel_irq/CMakeLists.txt b/dma/channel_irq/CMakeLists.txt index 25dc64e20..8f2a53967 100644 --- a/dma/channel_irq/CMakeLists.txt +++ b/dma/channel_irq/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(channel_irq C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(dma_channel_irq channel_irq.c ) diff --git a/dma/control_blocks/CMakeLists.txt b/dma/control_blocks/CMakeLists.txt index b551c7bfe..7f681b846 100644 --- a/dma/control_blocks/CMakeLists.txt +++ b/dma/control_blocks/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(control_blocks C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(dma_control_blocks control_blocks.c ) diff --git a/dma/hello_dma/CMakeLists.txt b/dma/hello_dma/CMakeLists.txt index b513a2eb8..a4181f7a3 100644 --- a/dma/hello_dma/CMakeLists.txt +++ b/dma/hello_dma/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_dma C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_dma hello_dma.c ) diff --git a/dma/sniff_crc/CMakeLists.txt b/dma/sniff_crc/CMakeLists.txt index 6f72b5100..801b73529 100644 --- a/dma/sniff_crc/CMakeLists.txt +++ b/dma/sniff_crc/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(sniff_crc C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(sniff_crc sniff_crc.c ) diff --git a/flash/cache_perfctr/CMakeLists.txt b/flash/cache_perfctr/CMakeLists.txt index 2d065a28e..4e4457a87 100644 --- a/flash/cache_perfctr/CMakeLists.txt +++ b/flash/cache_perfctr/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(cache_perfctr C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(flash_cache_perfctr flash_cache_perfctr.c ) diff --git a/flash/nuke/CMakeLists.txt b/flash/nuke/CMakeLists.txt index c8ae47a94..2f4510191 100644 --- a/flash/nuke/CMakeLists.txt +++ b/flash/nuke/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(nuke C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(flash_nuke nuke.c ) diff --git a/flash/program/CMakeLists.txt b/flash/program/CMakeLists.txt index a17bb0ec0..f8883e3e1 100644 --- a/flash/program/CMakeLists.txt +++ b/flash/program/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(program C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(flash_program flash_program.c ) diff --git a/flash/runtime_flash_permissions/CMakeLists.txt b/flash/runtime_flash_permissions/CMakeLists.txt index 3eb6bdd94..57850887d 100644 --- a/flash/runtime_flash_permissions/CMakeLists.txt +++ b/flash/runtime_flash_permissions/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(runtime_flash_permissions C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(runtime_flash_permissions runtime_flash_permissions.c ) diff --git a/flash/ssi_dma/CMakeLists.txt b/flash/ssi_dma/CMakeLists.txt index 965cc6098..6ea9e5c10 100644 --- a/flash/ssi_dma/CMakeLists.txt +++ b/flash/ssi_dma/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(ssi_dma C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(flash_ssi_dma flash_ssi_dma.c ) diff --git a/flash/xip_stream/CMakeLists.txt b/flash/xip_stream/CMakeLists.txt index bd8b6dd03..8897fad73 100644 --- a/flash/xip_stream/CMakeLists.txt +++ b/flash/xip_stream/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(xip_stream C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(flash_xip_stream flash_xip_stream.c ) diff --git a/freertos/hello_freertos/CMakeLists.txt b/freertos/hello_freertos/CMakeLists.txt index 1da0ce773..6bad6d688 100644 --- a/freertos/hello_freertos/CMakeLists.txt +++ b/freertos/hello_freertos/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_freertos C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + set(TARGET_NAME hello_freertos1) add_executable(${TARGET_NAME} hello_freertos.c diff --git a/gpio/dht_sensor/CMakeLists.txt b/gpio/dht_sensor/CMakeLists.txt index 33c72ea99..5fe503939 100644 --- a/gpio/dht_sensor/CMakeLists.txt +++ b/gpio/dht_sensor/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(dht_sensor C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(dht dht.c ) diff --git a/gpio/hello_7segment/CMakeLists.txt b/gpio/hello_7segment/CMakeLists.txt index d0ce3aecf..00d2d39f6 100644 --- a/gpio/hello_7segment/CMakeLists.txt +++ b/gpio/hello_7segment/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_7segment C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_7segment hello_7segment.c ) diff --git a/gpio/hello_gpio_irq/CMakeLists.txt b/gpio/hello_gpio_irq/CMakeLists.txt index e514cfbea..c51b24f69 100644 --- a/gpio/hello_gpio_irq/CMakeLists.txt +++ b/gpio/hello_gpio_irq/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_gpio_irq C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_gpio_irq hello_gpio_irq.c ) diff --git a/hello_world/serial/CMakeLists.txt b/hello_world/serial/CMakeLists.txt index 7be690122..899195810 100644 --- a/hello_world/serial/CMakeLists.txt +++ b/hello_world/serial/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(serial C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_serial hello_serial.c ) diff --git a/hello_world/usb/CMakeLists.txt b/hello_world/usb/CMakeLists.txt index aa176eb93..633c2863d 100644 --- a/hello_world/usb/CMakeLists.txt +++ b/hello_world/usb/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(usb C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (TARGET tinyusb_device) add_executable(hello_usb hello_usb.c diff --git a/hstx/dvi_out_hstx_encoder/CMakeLists.txt b/hstx/dvi_out_hstx_encoder/CMakeLists.txt index 4c9b3a345..8a56cdf48 100644 --- a/hstx/dvi_out_hstx_encoder/CMakeLists.txt +++ b/hstx/dvi_out_hstx_encoder/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(dvi_out_hstx_encoder C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(dvi_out_hstx_encoder dvi_out_hstx_encoder.c ) diff --git a/hstx/spi_lcd/CMakeLists.txt b/hstx/spi_lcd/CMakeLists.txt index 7d8551ac0..ce5bdb139 100644 --- a/hstx/spi_lcd/CMakeLists.txt +++ b/hstx/spi_lcd/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(spi_lcd C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hstx_spi_lcd hstx_spi_lcd.c ) diff --git a/i2c/bmp280_i2c/CMakeLists.txt b/i2c/bmp280_i2c/CMakeLists.txt index c63a7baba..c9bcc10ad 100644 --- a/i2c/bmp280_i2c/CMakeLists.txt +++ b/i2c/bmp280_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(bmp280_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(bmp280_i2c bmp280_i2c.c ) diff --git a/i2c/bus_scan/CMakeLists.txt b/i2c/bus_scan/CMakeLists.txt index 662cfe61b..c2b1ebadf 100644 --- a/i2c/bus_scan/CMakeLists.txt +++ b/i2c/bus_scan/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(bus_scan C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(i2c_bus_scan bus_scan.c ) diff --git a/i2c/ht16k33_i2c/CMakeLists.txt b/i2c/ht16k33_i2c/CMakeLists.txt index b9b1110fb..526a0ceb6 100644 --- a/i2c/ht16k33_i2c/CMakeLists.txt +++ b/i2c/ht16k33_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(ht16k33_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(ht16k33_i2c ht16k33_i2c.c ) diff --git a/i2c/lcd_1602_i2c/CMakeLists.txt b/i2c/lcd_1602_i2c/CMakeLists.txt index c6aad7ae1..a2ace29f3 100644 --- a/i2c/lcd_1602_i2c/CMakeLists.txt +++ b/i2c/lcd_1602_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(lcd_1602_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(lcd_1602_i2c lcd_1602_i2c.c ) diff --git a/i2c/lis3dh_i2c/CMakeLists.txt b/i2c/lis3dh_i2c/CMakeLists.txt index 0b23c9043..f274f009c 100644 --- a/i2c/lis3dh_i2c/CMakeLists.txt +++ b/i2c/lis3dh_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(lis3dh_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(lis3dh_i2c lis3dh_i2c.c ) diff --git a/i2c/mcp9808_i2c/CMakeLists.txt b/i2c/mcp9808_i2c/CMakeLists.txt index 4ee1b4975..d5bd69302 100644 --- a/i2c/mcp9808_i2c/CMakeLists.txt +++ b/i2c/mcp9808_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(mcp9808_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(mcp9808_i2c mcp9808_i2c.c ) diff --git a/i2c/mma8451_i2c/CMakeLists.txt b/i2c/mma8451_i2c/CMakeLists.txt index e3c1084d1..8892cb6d7 100644 --- a/i2c/mma8451_i2c/CMakeLists.txt +++ b/i2c/mma8451_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(mma8451_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(mma8451_i2c mma8451_i2c.c ) diff --git a/i2c/mpl3115a2_i2c/CMakeLists.txt b/i2c/mpl3115a2_i2c/CMakeLists.txt index db9a5d7b6..ba4b09c45 100644 --- a/i2c/mpl3115a2_i2c/CMakeLists.txt +++ b/i2c/mpl3115a2_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(mpl3115a2_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(mpl3115a2_i2c mpl3115a2_i2c.c ) diff --git a/i2c/mpu6050_i2c/CMakeLists.txt b/i2c/mpu6050_i2c/CMakeLists.txt index 83be3d51e..19cc8df79 100644 --- a/i2c/mpu6050_i2c/CMakeLists.txt +++ b/i2c/mpu6050_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(mpu6050_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(mpu6050_i2c mpu6050_i2c.c ) diff --git a/i2c/pa1010d_i2c/CMakeLists.txt b/i2c/pa1010d_i2c/CMakeLists.txt index b04fac23f..f1cbdc350 100644 --- a/i2c/pa1010d_i2c/CMakeLists.txt +++ b/i2c/pa1010d_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(pa1010d_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pa1010d_i2c pa1010d_i2c.c ) diff --git a/i2c/pcf8523_i2c/CMakeLists.txt b/i2c/pcf8523_i2c/CMakeLists.txt index 8d47635b3..2450560a4 100644 --- a/i2c/pcf8523_i2c/CMakeLists.txt +++ b/i2c/pcf8523_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(pcf8523_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pcf8523_i2c pcf8523_i2c.c ) diff --git a/i2c/slave_mem_i2c/CMakeLists.txt b/i2c/slave_mem_i2c/CMakeLists.txt index 449744447..cf8b1f5ef 100644 --- a/i2c/slave_mem_i2c/CMakeLists.txt +++ b/i2c/slave_mem_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(slave_mem_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(slave_mem_i2c slave_mem_i2c.c ) diff --git a/i2c/ssd1306_i2c/CMakeLists.txt b/i2c/ssd1306_i2c/CMakeLists.txt index 25fabace1..a56f0ba38 100644 --- a/i2c/ssd1306_i2c/CMakeLists.txt +++ b/i2c/ssd1306_i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(ssd1306_i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(ssd1306_i2c ssd1306_i2c.c ) diff --git a/interp/hello_interp/CMakeLists.txt b/interp/hello_interp/CMakeLists.txt index 05b176da7..796b56505 100644 --- a/interp/hello_interp/CMakeLists.txt +++ b/interp/hello_interp/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_interp C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (TARGET hardware_interp) add_executable(hello_interp hello_interp.c diff --git a/multicore/hello_multicore/CMakeLists.txt b/multicore/hello_multicore/CMakeLists.txt index 540d67948..a78205f99 100644 --- a/multicore/hello_multicore/CMakeLists.txt +++ b/multicore/hello_multicore/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_multicore C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_multicore multicore.c ) diff --git a/multicore/multicore_doorbell/CMakeLists.txt b/multicore/multicore_doorbell/CMakeLists.txt index 8e2493e18..8bc61b272 100644 --- a/multicore/multicore_doorbell/CMakeLists.txt +++ b/multicore/multicore_doorbell/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(multicore_doorbell C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(multicore_doorbell multicore_doorbell.c ) diff --git a/multicore/multicore_fifo_irqs/CMakeLists.txt b/multicore/multicore_fifo_irqs/CMakeLists.txt index aa1097e14..dc580ebfc 100644 --- a/multicore/multicore_fifo_irqs/CMakeLists.txt +++ b/multicore/multicore_fifo_irqs/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(multicore_fifo_irqs C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(multicore_fifo_irqs multicore_fifo_irqs.c ) diff --git a/multicore/multicore_runner/CMakeLists.txt b/multicore/multicore_runner/CMakeLists.txt index a96db31e0..fb439c975 100644 --- a/multicore/multicore_runner/CMakeLists.txt +++ b/multicore/multicore_runner/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(multicore_runner C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(multicore_runner multicore_runner.c ) diff --git a/multicore/multicore_runner_queue/CMakeLists.txt b/multicore/multicore_runner_queue/CMakeLists.txt index c35368a78..c237d6656 100644 --- a/multicore/multicore_runner_queue/CMakeLists.txt +++ b/multicore/multicore_runner_queue/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(multicore_runner_queue C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(multicore_runner_queue multicore_runner_queue.c ) diff --git a/otp/hello_otp/CMakeLists.txt b/otp/hello_otp/CMakeLists.txt index 43397cd3e..3c9bd16c8 100644 --- a/otp/hello_otp/CMakeLists.txt +++ b/otp/hello_otp/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_otp C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_otp hello_otp.c ) diff --git a/pico_w/bt/standalone/CMakeLists.txt b/pico_w/bt/standalone/CMakeLists.txt index 28d20b687..fd03a241a 100644 --- a/pico_w/bt/standalone/CMakeLists.txt +++ b/pico_w/bt/standalone/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(standalone C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + # Standalone example that reads from the on board temperature sensor and sends notifications via BLE # Flashes slowly each second to show it's running add_executable(picow_ble_temp_sensor diff --git a/pico_w/wifi/access_point/CMakeLists.txt b/pico_w/wifi/access_point/CMakeLists.txt index 6bc0a2eb4..9677298c1 100644 --- a/pico_w/wifi/access_point/CMakeLists.txt +++ b/pico_w/wifi/access_point/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(access_point C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_access_point_background picow_access_point.c dhcpserver/dhcpserver.c diff --git a/pico_w/wifi/blink/CMakeLists.txt b/pico_w/wifi/blink/CMakeLists.txt index 2b1e6bfd3..547773e39 100644 --- a/pico_w/wifi/blink/CMakeLists.txt +++ b/pico_w/wifi/blink/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(blink C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_blink picow_blink.c ) diff --git a/pico_w/wifi/freertos/http_client/CMakeLists.txt b/pico_w/wifi/freertos/http_client/CMakeLists.txt index 2010621a9..6bc8d15ac 100644 --- a/pico_w/wifi/freertos/http_client/CMakeLists.txt +++ b/pico_w/wifi/freertos/http_client/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(http_client C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + # This example is disabled as mbedtls uses too much stack, and Freertos SMP is problematic with # pico_cyw43_arch_lwip_threadsafe_background (nosys), where WiFi and LwIP activity is performed in an IRQ. # Prefer to use pico_cyw43_arch_lwip_sys_freertos instead, where WiFi and LwIP activity is performed in a thread. diff --git a/pico_w/wifi/freertos/httpd/CMakeLists.txt b/pico_w/wifi/freertos/httpd/CMakeLists.txt index 35dd4eb35..a66c9889a 100644 --- a/pico_w/wifi/freertos/httpd/CMakeLists.txt +++ b/pico_w/wifi/freertos/httpd/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(httpd C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) add_executable(pico_freertos_httpd_nosys diff --git a/pico_w/wifi/freertos/iperf/CMakeLists.txt b/pico_w/wifi/freertos/iperf/CMakeLists.txt index 2cc17c560..261c9c696 100644 --- a/pico_w/wifi/freertos/iperf/CMakeLists.txt +++ b/pico_w/wifi/freertos/iperf/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(iperf C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_freertos_iperf_server_nosys picow_freertos_iperf.c ) diff --git a/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt b/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt index 3cb02d5f1..e634e7d46 100644 --- a/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt +++ b/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(ntp_client_socket C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_freertos_ntp_client_socket picow_freertos_ntp_client_socket.c ) diff --git a/pico_w/wifi/freertos/ping/CMakeLists.txt b/pico_w/wifi/freertos/ping/CMakeLists.txt index 1296e09bf..a0252b78b 100644 --- a/pico_w/wifi/freertos/ping/CMakeLists.txt +++ b/pico_w/wifi/freertos/ping/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(ping C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (EXISTS ${PICO_LWIP_CONTRIB_PATH}/apps/ping/ping.c) add_executable(picow_freertos_ping_nosys picow_freertos_ping.c diff --git a/pico_w/wifi/http_client/CMakeLists.txt b/pico_w/wifi/http_client/CMakeLists.txt index a1be39398..0599b801f 100644 --- a/pico_w/wifi/http_client/CMakeLists.txt +++ b/pico_w/wifi/http_client/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(http_client C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + pico_add_library(example_lwip_http_util NOFLAG) target_sources(example_lwip_http_util INTERFACE ${CMAKE_CURRENT_LIST_DIR}/example_http_client_util.c diff --git a/pico_w/wifi/httpd/CMakeLists.txt b/pico_w/wifi/httpd/CMakeLists.txt index f028ef6dd..87802747d 100644 --- a/pico_w/wifi/httpd/CMakeLists.txt +++ b/pico_w/wifi/httpd/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(httpd C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) add_executable(picow_httpd_background diff --git a/pico_w/wifi/iperf/CMakeLists.txt b/pico_w/wifi/iperf/CMakeLists.txt index 56a6a1b0a..7e4c28240 100644 --- a/pico_w/wifi/iperf/CMakeLists.txt +++ b/pico_w/wifi/iperf/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(iperf C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_iperf_server_background picow_iperf.c ) diff --git a/pico_w/wifi/ntp_client/CMakeLists.txt b/pico_w/wifi/ntp_client/CMakeLists.txt index 22a2e6354..a418e32db 100644 --- a/pico_w/wifi/ntp_client/CMakeLists.txt +++ b/pico_w/wifi/ntp_client/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(ntp_client C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_ntp_client_background picow_ntp_client.c ) diff --git a/pico_w/wifi/tcp_client/CMakeLists.txt b/pico_w/wifi/tcp_client/CMakeLists.txt index 0bb498a5c..546fcddaa 100644 --- a/pico_w/wifi/tcp_client/CMakeLists.txt +++ b/pico_w/wifi/tcp_client/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(tcp_client C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (NOT TEST_TCP_SERVER_IP) message("Skipping tcp_client example as TEST_TCP_SERVER_IP is not defined") else() diff --git a/pico_w/wifi/tcp_server/CMakeLists.txt b/pico_w/wifi/tcp_server/CMakeLists.txt index 3e8a48471..5a65dfc72 100644 --- a/pico_w/wifi/tcp_server/CMakeLists.txt +++ b/pico_w/wifi/tcp_server/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(tcp_server C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_tcpip_server_background picow_tcp_server.c ) diff --git a/pico_w/wifi/tls_client/CMakeLists.txt b/pico_w/wifi/tls_client/CMakeLists.txt index fdbe6c056..092ec1395 100644 --- a/pico_w/wifi/tls_client/CMakeLists.txt +++ b/pico_w/wifi/tls_client/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(tls_client C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_tls_client_background picow_tls_client.c tls_common.c diff --git a/pico_w/wifi/udp_beacon/CMakeLists.txt b/pico_w/wifi/udp_beacon/CMakeLists.txt index 59300eee4..46b473de0 100644 --- a/pico_w/wifi/udp_beacon/CMakeLists.txt +++ b/pico_w/wifi/udp_beacon/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(udp_beacon C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_udp_beacon_background picow_udp_beacon.c ) diff --git a/pico_w/wifi/wifi_scan/CMakeLists.txt b/pico_w/wifi/wifi_scan/CMakeLists.txt index ba0cd4f97..ec5d50fa2 100644 --- a/pico_w/wifi/wifi_scan/CMakeLists.txt +++ b/pico_w/wifi/wifi_scan/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(wifi_scan C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picow_wifi_scan_background picow_wifi_scan.c ) diff --git a/picoboard/blinky/CMakeLists.txt b/picoboard/blinky/CMakeLists.txt index e3e57abc7..6b1858d78 100644 --- a/picoboard/blinky/CMakeLists.txt +++ b/picoboard/blinky/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(blinky C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picoboard_blinky blinky.c ) diff --git a/picoboard/button/CMakeLists.txt b/picoboard/button/CMakeLists.txt index c3ef5d726..bab80706c 100644 --- a/picoboard/button/CMakeLists.txt +++ b/picoboard/button/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(button C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(picoboard_button button.c ) diff --git a/pio/addition/CMakeLists.txt b/pio/addition/CMakeLists.txt index 9ff90779e..bc37eb70b 100644 --- a/pio/addition/CMakeLists.txt +++ b/pio/addition/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(addition C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_addition) pico_generate_pio_header(pio_addition ${CMAKE_CURRENT_LIST_DIR}/addition.pio) diff --git a/pio/apa102/CMakeLists.txt b/pio/apa102/CMakeLists.txt index 1522f5564..515af7f42 100644 --- a/pio/apa102/CMakeLists.txt +++ b/pio/apa102/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(apa102 C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_apa102) pico_generate_pio_header(pio_apa102 ${CMAKE_CURRENT_LIST_DIR}/apa102.pio) diff --git a/pio/clocked_input/CMakeLists.txt b/pio/clocked_input/CMakeLists.txt index cd71408a3..861a50a39 100644 --- a/pio/clocked_input/CMakeLists.txt +++ b/pio/clocked_input/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(clocked_input C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_clocked_input) pico_generate_pio_header(pio_clocked_input ${CMAKE_CURRENT_LIST_DIR}/clocked_input.pio) diff --git a/pio/differential_manchester/CMakeLists.txt b/pio/differential_manchester/CMakeLists.txt index 6276f09f5..9033b1a57 100644 --- a/pio/differential_manchester/CMakeLists.txt +++ b/pio/differential_manchester/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(differential_manchester C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_differential_manchester) pico_generate_pio_header(pio_differential_manchester ${CMAKE_CURRENT_LIST_DIR}/differential_manchester.pio) diff --git a/pio/hello_pio/CMakeLists.txt b/pio/hello_pio/CMakeLists.txt index 1c1d67496..4537b61a8 100644 --- a/pio/hello_pio/CMakeLists.txt +++ b/pio/hello_pio/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_pio C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_pio) pico_generate_pio_header(hello_pio ${CMAKE_CURRENT_LIST_DIR}/hello.pio) diff --git a/pio/hub75/CMakeLists.txt b/pio/hub75/CMakeLists.txt index a976f4eab..5e1813070 100644 --- a/pio/hub75/CMakeLists.txt +++ b/pio/hub75/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hub75 C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_hub75) pico_generate_pio_header(pio_hub75 ${CMAKE_CURRENT_LIST_DIR}/hub75.pio) diff --git a/pio/i2c/CMakeLists.txt b/pio/i2c/CMakeLists.txt index d49b22482..ffd1127c5 100644 --- a/pio/i2c/CMakeLists.txt +++ b/pio/i2c/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(i2c C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_i2c_bus_scan) pico_generate_pio_header(pio_i2c_bus_scan ${CMAKE_CURRENT_LIST_DIR}/i2c.pio) diff --git a/pio/ir_nec/ir_loopback/CMakeLists.txt b/pio/ir_nec/ir_loopback/CMakeLists.txt index 8c7d8f4b7..143f88c67 100644 --- a/pio/ir_nec/ir_loopback/CMakeLists.txt +++ b/pio/ir_nec/ir_loopback/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(ir_loopback C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable (pio_ir_loopback ir_loopback.c) # link the executable using the IR transmit and receive libraries diff --git a/pio/logic_analyser/CMakeLists.txt b/pio/logic_analyser/CMakeLists.txt index 8a65198a9..d9c50ff7d 100644 --- a/pio/logic_analyser/CMakeLists.txt +++ b/pio/logic_analyser/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(logic_analyser C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_logic_analyser) target_sources(pio_logic_analyser PRIVATE logic_analyser.c) diff --git a/pio/manchester_encoding/CMakeLists.txt b/pio/manchester_encoding/CMakeLists.txt index 70b88283a..7a670f03a 100644 --- a/pio/manchester_encoding/CMakeLists.txt +++ b/pio/manchester_encoding/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(manchester_encoding C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_manchester_encoding) pico_generate_pio_header(pio_manchester_encoding ${CMAKE_CURRENT_LIST_DIR}/manchester_encoding.pio) diff --git a/pio/onewire/CMakeLists.txt b/pio/onewire/CMakeLists.txt index 4090cb36c..f7bbe3da2 100644 --- a/pio/onewire/CMakeLists.txt +++ b/pio/onewire/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(onewire C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_onewire) target_sources(pio_onewire PRIVATE onewire.c) diff --git a/pio/pio_blink/CMakeLists.txt b/pio/pio_blink/CMakeLists.txt index 88b5584fd..09d840ef2 100644 --- a/pio/pio_blink/CMakeLists.txt +++ b/pio/pio_blink/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(pio_blink C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_blink) # by default the header is generated into the build dir diff --git a/pio/pwm/CMakeLists.txt b/pio/pwm/CMakeLists.txt index 7c6f2fc01..831440472 100644 --- a/pio/pwm/CMakeLists.txt +++ b/pio/pwm/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(pwm C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_pwm) pico_generate_pio_header(pio_pwm ${CMAKE_CURRENT_LIST_DIR}/pwm.pio) diff --git a/pio/quadrature_encoder/CMakeLists.txt b/pio/quadrature_encoder/CMakeLists.txt index b118f3c27..c93abf69f 100644 --- a/pio/quadrature_encoder/CMakeLists.txt +++ b/pio/quadrature_encoder/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(quadrature_encoder C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_quadrature_encoder) pico_generate_pio_header(pio_quadrature_encoder ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder.pio) diff --git a/pio/quadrature_encoder_substep/CMakeLists.txt b/pio/quadrature_encoder_substep/CMakeLists.txt index 7bc7f6a0a..cce60f215 100644 --- a/pio/quadrature_encoder_substep/CMakeLists.txt +++ b/pio/quadrature_encoder_substep/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(quadrature_encoder_substep C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_quadrature_encoder_substep) pico_generate_pio_header(pio_quadrature_encoder_substep ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder_substep.pio) diff --git a/pio/spi/CMakeLists.txt b/pio/spi/CMakeLists.txt index 44c561a85..90cef1859 100644 --- a/pio/spi/CMakeLists.txt +++ b/pio/spi/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(spi C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_spi_flash) pico_generate_pio_header(pio_spi_flash ${CMAKE_CURRENT_LIST_DIR}/spi.pio) diff --git a/pio/squarewave/CMakeLists.txt b/pio/squarewave/CMakeLists.txt index fe503bb1d..9d0bae143 100644 --- a/pio/squarewave/CMakeLists.txt +++ b/pio/squarewave/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(squarewave C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_squarewave) pico_generate_pio_header(pio_squarewave ${CMAKE_CURRENT_LIST_DIR}/squarewave.pio) diff --git a/pio/st7789_lcd/CMakeLists.txt b/pio/st7789_lcd/CMakeLists.txt index a6243e646..3c507091a 100644 --- a/pio/st7789_lcd/CMakeLists.txt +++ b/pio/st7789_lcd/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(st7789_lcd C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_st7789_lcd) pico_generate_pio_header(pio_st7789_lcd ${CMAKE_CURRENT_LIST_DIR}/st7789_lcd.pio) diff --git a/pio/uart_rx/CMakeLists.txt b/pio/uart_rx/CMakeLists.txt index 5f985e1bb..7e59fea54 100644 --- a/pio/uart_rx/CMakeLists.txt +++ b/pio/uart_rx/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(uart_rx C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_uart_rx) pico_generate_pio_header(pio_uart_rx ${CMAKE_CURRENT_LIST_DIR}/uart_rx.pio) diff --git a/pio/uart_tx/CMakeLists.txt b/pio/uart_tx/CMakeLists.txt index 5e3cf2a82..57619c26d 100644 --- a/pio/uart_tx/CMakeLists.txt +++ b/pio/uart_tx/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(uart_tx C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_uart_tx) pico_generate_pio_header(pio_uart_tx ${CMAKE_CURRENT_LIST_DIR}/uart_tx.pio) diff --git a/pio/ws2812/CMakeLists.txt b/pio/ws2812/CMakeLists.txt index 3e887b908..f7931ec4f 100644 --- a/pio/ws2812/CMakeLists.txt +++ b/pio/ws2812/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(ws2812 C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pio_ws2812) file(MAKE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/generated) diff --git a/pwm/hello_pwm/CMakeLists.txt b/pwm/hello_pwm/CMakeLists.txt index e2df80ceb..9e2806d0a 100644 --- a/pwm/hello_pwm/CMakeLists.txt +++ b/pwm/hello_pwm/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_pwm C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_pwm hello_pwm.c ) diff --git a/pwm/led_fade/CMakeLists.txt b/pwm/led_fade/CMakeLists.txt index a9f5eea56..beee4fd0c 100644 --- a/pwm/led_fade/CMakeLists.txt +++ b/pwm/led_fade/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(led_fade C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pwm_led_fade pwm_led_fade.c ) diff --git a/pwm/measure_duty_cycle/CMakeLists.txt b/pwm/measure_duty_cycle/CMakeLists.txt index 45bd4d623..63e10863f 100644 --- a/pwm/measure_duty_cycle/CMakeLists.txt +++ b/pwm/measure_duty_cycle/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(measure_duty_cycle C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(pwm_measure_duty_cycle measure_duty_cycle.c ) diff --git a/reset/hello_reset/CMakeLists.txt b/reset/hello_reset/CMakeLists.txt index fc0854377..06bad7c3c 100644 --- a/reset/hello_reset/CMakeLists.txt +++ b/reset/hello_reset/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_reset C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (TARGET hardware_resets) add_executable(hello_reset hello_reset.c diff --git a/rtc/hello_rtc/CMakeLists.txt b/rtc/hello_rtc/CMakeLists.txt index b3cc1a25c..035c9c8e8 100644 --- a/rtc/hello_rtc/CMakeLists.txt +++ b/rtc/hello_rtc/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_rtc C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_rtc hello_rtc.c ) diff --git a/rtc/rtc_alarm/CMakeLists.txt b/rtc/rtc_alarm/CMakeLists.txt index 8f0dfa2cb..6fe9e3665 100644 --- a/rtc/rtc_alarm/CMakeLists.txt +++ b/rtc/rtc_alarm/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(rtc_alarm C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(rtc_alarm rtc_alarm.c ) diff --git a/rtc/rtc_alarm_repeat/CMakeLists.txt b/rtc/rtc_alarm_repeat/CMakeLists.txt index bd3c9e3e0..4ed6dca68 100644 --- a/rtc/rtc_alarm_repeat/CMakeLists.txt +++ b/rtc/rtc_alarm_repeat/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(rtc_alarm_repeat C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(rtc_alarm_repeat rtc_alarm_repeat.c ) diff --git a/sha/mbedtls_sha256/CMakeLists.txt b/sha/mbedtls_sha256/CMakeLists.txt index a9bec5d18..0ccd100c1 100644 --- a/sha/mbedtls_sha256/CMakeLists.txt +++ b/sha/mbedtls_sha256/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(mbedtls_sha256 C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (NOT TARGET hardware_sha256) return() endif() diff --git a/sha/sha256/CMakeLists.txt b/sha/sha256/CMakeLists.txt index 5835fe863..58154c94d 100644 --- a/sha/sha256/CMakeLists.txt +++ b/sha/sha256/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(sha256 C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (NOT TARGET hardware_sha256) return() endif() diff --git a/spi/bme280_spi/CMakeLists.txt b/spi/bme280_spi/CMakeLists.txt index 117d01a51..e782cd248 100644 --- a/spi/bme280_spi/CMakeLists.txt +++ b/spi/bme280_spi/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(bme280_spi C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(bme280_spi bme280_spi.c ) diff --git a/spi/max7219_32x8_spi/CMakeLists.txt b/spi/max7219_32x8_spi/CMakeLists.txt index 415eb33f3..5bdec9d37 100644 --- a/spi/max7219_32x8_spi/CMakeLists.txt +++ b/spi/max7219_32x8_spi/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(max7219_32x8_spi C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(max7219_32x8_spi max7219_32x8_spi.c ) diff --git a/spi/max7219_8x7seg_spi/CMakeLists.txt b/spi/max7219_8x7seg_spi/CMakeLists.txt index ab0b08c12..7140fcf4a 100644 --- a/spi/max7219_8x7seg_spi/CMakeLists.txt +++ b/spi/max7219_8x7seg_spi/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(max7219_8x7seg_spi C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(max7219_8x7seg_spi max7219_8x7seg_spi.c ) diff --git a/spi/mpu9250_spi/CMakeLists.txt b/spi/mpu9250_spi/CMakeLists.txt index 5e0a6120a..271048342 100644 --- a/spi/mpu9250_spi/CMakeLists.txt +++ b/spi/mpu9250_spi/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(mpu9250_spi C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(mpu9250_spi mpu9250_spi.c ) diff --git a/spi/spi_dma/CMakeLists.txt b/spi/spi_dma/CMakeLists.txt index 3adfdda60..72d4e7fe5 100644 --- a/spi/spi_dma/CMakeLists.txt +++ b/spi/spi_dma/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(spi_dma C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(spi_dma spi_dma.c ) diff --git a/spi/spi_flash/CMakeLists.txt b/spi/spi_flash/CMakeLists.txt index 2a0ddcc35..b08a5f627 100644 --- a/spi/spi_flash/CMakeLists.txt +++ b/spi/spi_flash/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(spi_flash C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(spi_flash spi_flash.c ) diff --git a/spi/spi_master_slave/spi_master/CMakeLists.txt b/spi/spi_master_slave/spi_master/CMakeLists.txt index 534e78fd6..2d452ce78 100644 --- a/spi/spi_master_slave/spi_master/CMakeLists.txt +++ b/spi/spi_master_slave/spi_master/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(spi_master C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(spi_master spi_master.c ) diff --git a/spi/spi_master_slave/spi_slave/CMakeLists.txt b/spi/spi_master_slave/spi_slave/CMakeLists.txt index 8e0564506..d0a374bd5 100644 --- a/spi/spi_master_slave/spi_slave/CMakeLists.txt +++ b/spi/spi_master_slave/spi_slave/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(spi_slave C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(spi_slave spi_slave.c ) diff --git a/system/boot_info/CMakeLists.txt b/system/boot_info/CMakeLists.txt index ec166f968..afc9c79f9 100644 --- a/system/boot_info/CMakeLists.txt +++ b/system/boot_info/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(boot_info C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(boot_info boot_info.c ) diff --git a/system/hello_double_tap/CMakeLists.txt b/system/hello_double_tap/CMakeLists.txt index 30a9e12f7..ff34c649a 100644 --- a/system/hello_double_tap/CMakeLists.txt +++ b/system/hello_double_tap/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_double_tap C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_double_tap hello_double_tap.c ) diff --git a/system/narrow_io_write/CMakeLists.txt b/system/narrow_io_write/CMakeLists.txt index 5e57819d7..63f9bbc32 100644 --- a/system/narrow_io_write/CMakeLists.txt +++ b/system/narrow_io_write/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(narrow_io_write C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(narrow_io_write narrow_io_write.c ) diff --git a/system/rand/CMakeLists.txt b/system/rand/CMakeLists.txt index f874c9f78..f776f7f2c 100644 --- a/system/rand/CMakeLists.txt +++ b/system/rand/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(rand C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(rand rand.c ) diff --git a/system/unique_board_id/CMakeLists.txt b/system/unique_board_id/CMakeLists.txt index 1a5b1f989..0f5f4a94b 100644 --- a/system/unique_board_id/CMakeLists.txt +++ b/system/unique_board_id/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(unique_board_id C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(unique_board_id unique_board_id.c ) diff --git a/timer/hello_timer/CMakeLists.txt b/timer/hello_timer/CMakeLists.txt index 806cf699f..56f7b891e 100644 --- a/timer/hello_timer/CMakeLists.txt +++ b/timer/hello_timer/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_timer C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_timer hello_timer.c ) diff --git a/timer/periodic_sampler/CMakeLists.txt b/timer/periodic_sampler/CMakeLists.txt index 284780fb3..7231830e7 100644 --- a/timer/periodic_sampler/CMakeLists.txt +++ b/timer/periodic_sampler/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(periodic_sampler C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (NOT PICO_TIME_NO_ALARM_SUPPORT) add_executable(periodic_sampler periodic_sampler.c diff --git a/timer/timer_lowlevel/CMakeLists.txt b/timer/timer_lowlevel/CMakeLists.txt index 55d4e82aa..3f298e13c 100644 --- a/timer/timer_lowlevel/CMakeLists.txt +++ b/timer/timer_lowlevel/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(timer_lowlevel C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + if (PICO_ON_DEVICE) add_executable(timer_lowlevel timer_lowlevel.c) diff --git a/uart/hello_uart/CMakeLists.txt b/uart/hello_uart/CMakeLists.txt index 0931f384d..2c14788d5 100644 --- a/uart/hello_uart/CMakeLists.txt +++ b/uart/hello_uart/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_uart C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_uart hello_uart.c ) diff --git a/uart/lcd_uart/CMakeLists.txt b/uart/lcd_uart/CMakeLists.txt index 64098821f..a7b1cf6c1 100644 --- a/uart/lcd_uart/CMakeLists.txt +++ b/uart/lcd_uart/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(lcd_uart C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(lcd_uart lcd_uart.c ) diff --git a/uart/uart_advanced/CMakeLists.txt b/uart/uart_advanced/CMakeLists.txt index a7cf5638e..89af08c88 100644 --- a/uart/uart_advanced/CMakeLists.txt +++ b/uart/uart_advanced/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(uart_advanced C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(uart_advanced uart_advanced.c ) diff --git a/universal/hello_universal/CMakeLists.txt b/universal/hello_universal/CMakeLists.txt index 51269beac..a5df3f755 100644 --- a/universal/hello_universal/CMakeLists.txt +++ b/universal/hello_universal/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_universal C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_universal hello_universal.c ) diff --git a/usb/device/dev_hid_composite/CMakeLists.txt b/usb/device/dev_hid_composite/CMakeLists.txt index cd035d9a5..9199f1124 100644 --- a/usb/device/dev_hid_composite/CMakeLists.txt +++ b/usb/device/dev_hid_composite/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(dev_hid_composite C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + cmake_minimum_required(VERSION 3.13) add_executable(dev_hid_composite) diff --git a/usb/device/dev_lowlevel/CMakeLists.txt b/usb/device/dev_lowlevel/CMakeLists.txt index 906c84e5f..27205f274 100644 --- a/usb/device/dev_lowlevel/CMakeLists.txt +++ b/usb/device/dev_lowlevel/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(dev_lowlevel C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(dev_lowlevel dev_lowlevel.c ) diff --git a/usb/host/host_cdc_msc_hid/CMakeLists.txt b/usb/host/host_cdc_msc_hid/CMakeLists.txt index 55f5a4a98..a794f535c 100644 --- a/usb/host/host_cdc_msc_hid/CMakeLists.txt +++ b/usb/host/host_cdc_msc_hid/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(host_cdc_msc_hid C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + cmake_minimum_required(VERSION 3.13) add_executable(host_cdc_msc_hid) diff --git a/watchdog/hello_watchdog/CMakeLists.txt b/watchdog/hello_watchdog/CMakeLists.txt index 9e1e5d006..4866fcc44 100644 --- a/watchdog/hello_watchdog/CMakeLists.txt +++ b/watchdog/hello_watchdog/CMakeLists.txt @@ -1,3 +1,29 @@ +cmake_minimum_required(VERSION 3.12) + +if (NOT CMAKE_PROJECT_NAME) + # Pull in SDK (must be before project) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) + elseif (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + # The root pico-examples one + include(${CMAKE_CURRENT_LIST_DIR}/../../pico_sdk_import.cmake) + else() + message(FATAL_ERROR "Unable to locate pico_sdk_import.cmake - make sure you have copied it into this directory") + endif() + + project(hello_watchdog C CXX ASM) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + + # Initialize the SDK + pico_sdk_init() + + # Do not use this function when not part of main examples project + function(example_auto_set_url) + endfunction() +endif() + add_executable(hello_watchdog hello_watchdog.c )