Explorar el Código

cmake: Add CMakeLists.txt files for all examples

Generating using convert_to_cmake.py, with some minor cleanup
Angus Gratton hace 8 años
padre
commit
800bffb8b0
Se han modificado 74 ficheros con 615 adiciones y 27 borrados
  1. 18 1
      components/app_trace/CMakeLists.txt
  2. 8 22
      components/bt/CMakeLists.txt
  3. 12 0
      examples/bluetooth/a2dp_sink/CMakeLists.txt
  4. 11 0
      examples/bluetooth/a2dp_source/CMakeLists.txt
  5. 10 0
      examples/bluetooth/ble_adv/CMakeLists.txt
  6. 8 0
      examples/bluetooth/ble_eddystone/CMakeLists.txt
  7. 8 0
      examples/bluetooth/ble_ibeacon/CMakeLists.txt
  8. 8 0
      examples/bluetooth/ble_spp_client/CMakeLists.txt
  9. 8 0
      examples/bluetooth/ble_spp_server/CMakeLists.txt
  10. 8 0
      examples/bluetooth/blufi/CMakeLists.txt
  11. 8 0
      examples/bluetooth/bt_discovery/CMakeLists.txt
  12. 8 0
      examples/bluetooth/bt_spp_acceptor/CMakeLists.txt
  13. 8 0
      examples/bluetooth/bt_spp_initiator/CMakeLists.txt
  14. 8 0
      examples/bluetooth/controller_hci_uart/CMakeLists.txt
  15. 8 0
      examples/bluetooth/gatt_client/CMakeLists.txt
  16. 8 0
      examples/bluetooth/gatt_security_client/CMakeLists.txt
  17. 8 0
      examples/bluetooth/gatt_security_server/CMakeLists.txt
  18. 8 0
      examples/bluetooth/gatt_server/CMakeLists.txt
  19. 8 0
      examples/bluetooth/gatt_server_service_table/CMakeLists.txt
  20. 8 0
      examples/bluetooth/gattc_multi_connect/CMakeLists.txt
  21. 8 0
      examples/ethernet/ethernet/CMakeLists.txt
  22. 1 1
      examples/get-started/hello_world/CMakeLists.txt
  23. 8 0
      examples/peripherals/adc/CMakeLists.txt
  24. 8 0
      examples/peripherals/adc2/CMakeLists.txt
  25. 8 0
      examples/peripherals/gpio/CMakeLists.txt
  26. 8 0
      examples/peripherals/i2c/CMakeLists.txt
  27. 8 0
      examples/peripherals/i2s/CMakeLists.txt
  28. 8 0
      examples/peripherals/i2s_adc_dac/CMakeLists.txt
  29. 8 0
      examples/peripherals/ledc/CMakeLists.txt
  30. 8 0
      examples/peripherals/pcnt/CMakeLists.txt
  31. 8 0
      examples/peripherals/rmt_nec_tx_rx/CMakeLists.txt
  32. 8 0
      examples/peripherals/rmt_tx/CMakeLists.txt
  33. 8 0
      examples/peripherals/sigmadelta/CMakeLists.txt
  34. 8 0
      examples/peripherals/spi_master/CMakeLists.txt
  35. 8 0
      examples/peripherals/timer_group/CMakeLists.txt
  36. 8 0
      examples/peripherals/touch_pad_interrupt/CMakeLists.txt
  37. 8 0
      examples/peripherals/touch_pad_read/CMakeLists.txt
  38. 8 0
      examples/peripherals/uart_async_rxtxtasks/CMakeLists.txt
  39. 8 0
      examples/peripherals/uart_echo/CMakeLists.txt
  40. 8 0
      examples/peripherals/uart_events/CMakeLists.txt
  41. 1 3
      examples/protocols/aws_iot/subscribe_publish/CMakeLists.txt
  42. 13 0
      examples/protocols/aws_iot/thing_shadow/CMakeLists.txt
  43. 8 0
      examples/protocols/coap_client/CMakeLists.txt
  44. 8 0
      examples/protocols/coap_server/CMakeLists.txt
  45. 8 0
      examples/protocols/http2_request/CMakeLists.txt
  46. 5 0
      examples/protocols/http2_request/components/sh2lib/CMakeLists.txt
  47. 8 0
      examples/protocols/http_request/CMakeLists.txt
  48. 14 0
      examples/protocols/https_request/CMakeLists.txt
  49. 8 0
      examples/protocols/mdns/CMakeLists.txt
  50. 8 0
      examples/protocols/openssl_client/CMakeLists.txt
  51. 12 0
      examples/protocols/openssl_server/CMakeLists.txt
  52. 8 0
      examples/protocols/pppos_client/CMakeLists.txt
  53. 8 0
      examples/protocols/sntp/CMakeLists.txt
  54. 8 0
      examples/protocols/udp_multicast/CMakeLists.txt
  55. 8 0
      examples/storage/nvs_rw_blob/CMakeLists.txt
  56. 8 0
      examples/storage/nvs_rw_value/CMakeLists.txt
  57. 8 0
      examples/storage/sd_card/CMakeLists.txt
  58. 8 0
      examples/storage/spiffs/CMakeLists.txt
  59. 8 0
      examples/storage/wear_levelling/CMakeLists.txt
  60. 8 0
      examples/system/app_trace_to_host/CMakeLists.txt
  61. 8 0
      examples/system/base_mac_address/CMakeLists.txt
  62. 8 0
      examples/system/console/CMakeLists.txt
  63. 8 0
      examples/system/deep_sleep/CMakeLists.txt
  64. 8 0
      examples/system/gcov/CMakeLists.txt
  65. 8 0
      examples/system/ota/CMakeLists.txt
  66. 8 0
      examples/system/task_watchdog/CMakeLists.txt
  67. 8 0
      examples/wifi/espnow/CMakeLists.txt
  68. 8 0
      examples/wifi/iperf/CMakeLists.txt
  69. 5 0
      examples/wifi/iperf/components/CMakeLists.txt
  70. 8 0
      examples/wifi/power_save/CMakeLists.txt
  71. 8 0
      examples/wifi/scan/CMakeLists.txt
  72. 8 0
      examples/wifi/smart_config/CMakeLists.txt
  73. 17 0
      examples/wifi/wpa2_enterprise/CMakeLists.txt
  74. 8 0
      examples/wifi/wps/CMakeLists.txt

+ 18 - 1
components/app_trace/CMakeLists.txt

@@ -1,4 +1,21 @@
-set(COMPONENT_SRCDIRS ".")
+set(COMPONENT_SRCDIRS "." "gcov")
 set(COMPONENT_ADD_INCLUDEDIRS "include")
 
+if (CONFIG_SYSVIEW_ENABLE)
+    list(APPEND COMPONENT_ADD_INCLUDEDIRS
+        sys_view/Config
+        sys_view/SEGGER
+        sys_view/Sample/OS)
+
+    list(APPEND COMPONENT_SRCDIRS
+        "sys_view/SEGGER"
+        "sys_view/Sample/OS"
+        "sys_view/Sample/Config"
+        "sys_view/esp32")
+endif()
+
 register_component()
+
+# disable --coverage for this component, as it is used as transport
+# for gcov
+component_compile_options("-fno-profile-arcs" "-fno-test-coverage")

+ 8 - 22
components/bt/CMakeLists.txt

@@ -5,35 +5,24 @@ endif()
 set(COMPONENT_SRCDIRS .)
 set(COMPONENT_ADD_INCLUDEDIRS include)
 
-target_link_libraries("-L ${CMAKE_CURRENT_LIST_DIR}/lib")
-target_link_libraries(bt btdm_app)
-
 if(CONFIG_BLUEDROID_ENABLED)
 
-    set(COMPONENT_ADD_INCLUDEDIRS ${COMPONENT_ADD_INCLUDEDIRS}
+    list(APPEND COMPONENT_ADD_INCLUDEDIRS
         bluedroid/bta/include
         bluedroid/bta/sys/include
         bluedroid/btcore/include
         bluedroid/device/include
-        bluedroid/gki/include
         bluedroid/hci/include
         bluedroid/osi/include
-        bluedroid/utils/include
         bluedroid/external/sbc/decoder/include
-        bluedroid/btc/core/include
+		bluedroid/external/sbc/encoder/include
         bluedroid/btc/profile/esp/blufi/include
         bluedroid/btc/profile/esp/include
-        bluedroid/btc/profile/std/gatt/include
-        bluedroid/btc/profile/std/gap/include
         bluedroid/btc/profile/std/a2dp/include
         bluedroid/btc/profile/std/include
         bluedroid/btc/include
-        bluedroid/btif/include
-        bluedroid/stack/btm/include
-        bluedroid/stack/btu/include
         bluedroid/stack/gap/include
         bluedroid/stack/gatt/include
-        bluedroid/stack/hcic/include
         bluedroid/stack/l2cap/include
         bluedroid/stack/sdp/include
         bluedroid/stack/smp/include
@@ -43,11 +32,10 @@ if(CONFIG_BLUEDROID_ENABLED)
         bluedroid/stack/a2dp/include
         bluedroid/stack/rfcomm/include
         bluedroid/stack/include
-        bluedroid/utils/include
         bluedroid/api/include
         bluedroid/include)
 
-    set(COMPONENT_SRCDIRS ${COMPONENT_SRCDIRS}
+    list(APPEND COMPONENT_SRCDIRS
         bluedroid/bta/dm
         bluedroid/bta/gatt
         bluedroid/bta/hh
@@ -56,15 +44,14 @@ if(CONFIG_BLUEDROID_ENABLED)
         bluedroid/bta/ar
         bluedroid/bta/sys
         bluedroid/bta/jv
-        bluedroid/bta
         bluedroid/btcore
         bluedroid/btif
         bluedroid/device
-        bluedroid/gki
         bluedroid/hci
         bluedroid/main
         bluedroid/osi
         bluedroid/external/sbc/decoder/srce
+	    bluedroid/external/sbc/encoder/srce
         bluedroid/btc/core
         bluedroid/btc/profile/esp/blufi
         bluedroid/btc/profile/std/gap
@@ -72,13 +59,11 @@ if(CONFIG_BLUEDROID_ENABLED)
         bluedroid/btc/profile/std/a2dp
         bluedroid/btc/profile/std/avrc
         bluedroid/btc/profile/std/spp
-        bluedroid/btc/profile
         bluedroid/stack/btm
         bluedroid/stack/btu
         bluedroid/stack/gap
         bluedroid/stack/gatt
         bluedroid/stack/hcic
-        bluedroid/stack/include
         bluedroid/stack/l2cap
         bluedroid/stack/sdp
         bluedroid/stack/smp
@@ -87,11 +72,12 @@ if(CONFIG_BLUEDROID_ENABLED)
         bluedroid/stack/avdt
         bluedroid/stack/a2dp
         bluedroid/stack/rfcomm
-        bluedroid/stack
-        bluedroid/utils
         bluedroid/api
-        bluedroid)
+        )
 
 endif()
 
 register_component()
+
+target_link_libraries(bt "-L${CMAKE_CURRENT_LIST_DIR}/lib")
+target_link_libraries(bt btdm_app)

+ 12 - 0
examples/bluetooth/a2dp_sink/CMakeLists.txt

@@ -0,0 +1,12 @@
+# The following lines of boilerplate have to be in your project's
+# CMakeLists in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS
+    main/bt_app_av.c
+    main/bt_app_core.c
+    main/main.c
+    )
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(a2dp_sink)

+ 11 - 0
examples/bluetooth/a2dp_source/CMakeLists.txt

@@ -0,0 +1,11 @@
+# The following lines of boilerplate have to be in your project's
+# CMakeLists in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS
+    main/bt_app_core.c
+    main/main.c
+    )
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(a2dp_source)

+ 10 - 0
examples/bluetooth/ble_adv/CMakeLists.txt

@@ -0,0 +1,10 @@
+# The following lines of boilerplate have to be in your project's
+# CMakeLists in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS
+    main/app_bt.c
+    )
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(ble_adv)

+ 8 - 0
examples/bluetooth/ble_eddystone/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/esp_eddystone_api.c main/esp_eddystone_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(ble_eddystone_demo)

+ 8 - 0
examples/bluetooth/ble_ibeacon/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/ibeacon_demo.c main/esp_ibeacon_api.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(ble_ibeacon_demo)

+ 8 - 0
examples/bluetooth/ble_spp_client/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/spp_client_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(spp_client_demo)

+ 8 - 0
examples/bluetooth/ble_spp_server/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/ble_spp_server_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(ble_spp_server_demo)

+ 8 - 0
examples/bluetooth/blufi/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/blufi_security.c main/blufi_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(blufi_demo)

+ 8 - 0
examples/bluetooth/bt_discovery/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/bt_discovery.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(bt_discovery)

+ 8 - 0
examples/bluetooth/bt_spp_acceptor/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/example_spp_acceptor_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(bt_spp_acceptor_demo)

+ 8 - 0
examples/bluetooth/bt_spp_initiator/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/example_spp_initiator_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(bt_spp_initiator_demo)

+ 8 - 0
examples/bluetooth/controller_hci_uart/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/controller_hci_uart_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(controller_hci_uart)

+ 8 - 0
examples/bluetooth/gatt_client/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/gattc_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(gatt_client_demo)

+ 8 - 0
examples/bluetooth/gatt_security_client/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/example_ble_sec_gattc_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(sec_gattc_demo)

+ 8 - 0
examples/bluetooth/gatt_security_server/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/example_ble_sec_gatts_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(sec_gatts_demo)

+ 8 - 0
examples/bluetooth/gatt_server/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/gatts_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(gatt_server_demos)

+ 8 - 0
examples/bluetooth/gatt_server_service_table/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/gatts_table_creat_demo.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(gatt_server_service_table_demo)

+ 8 - 0
examples/bluetooth/gattc_multi_connect/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/gattc_multi_connect.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(gatt_multi_connect)

+ 8 - 0
examples/ethernet/ethernet/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/ethernet_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(ethernet_demo)

+ 1 - 1
examples/get-started/hello_world/CMakeLists.txt

@@ -1,4 +1,4 @@
-# The following five lines of boilerplate have to be in your project's
+# The following lines of boilerplate have to be in your project's
 # CMakeLists in this exact order for cmake to work correctly
 cmake_minimum_required(VERSION 3.5)
 

+ 8 - 0
examples/peripherals/adc/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/adc1_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(adc)

+ 8 - 0
examples/peripherals/adc2/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/adc2_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(adc2)

+ 8 - 0
examples/peripherals/gpio/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/gpio_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(gpio)

+ 8 - 0
examples/peripherals/i2c/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/i2c_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(i2c)

+ 8 - 0
examples/peripherals/i2s/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/i2s_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(esp32-i2s-driver-example)

+ 8 - 0
examples/peripherals/i2s_adc_dac/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/app_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(i2s-adc-dac)

+ 8 - 0
examples/peripherals/ledc/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/ledc_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(ledc)

+ 8 - 0
examples/peripherals/pcnt/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/pcnt_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(pcnt)

+ 8 - 0
examples/peripherals/rmt_nec_tx_rx/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/infrared_nec_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(infrared_nec)

+ 8 - 0
examples/peripherals/rmt_tx/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/rmt_tx_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(rmt_tx)

+ 8 - 0
examples/peripherals/sigmadelta/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/sigmadelta_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(sigmadelta)

+ 8 - 0
examples/peripherals/spi_master/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/spi_master_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(spi_master)

+ 8 - 0
examples/peripherals/timer_group/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/timer_group_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(timer_group)

+ 8 - 0
examples/peripherals/touch_pad_interrupt/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/tp_interrupt_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(touch_pad_interrupt)

+ 8 - 0
examples/peripherals/touch_pad_read/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/tp_read_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(touch_pad_read)

+ 8 - 0
examples/peripherals/uart_async_rxtxtasks/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/uart_async_rxtxtasks_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(uart_async_rxtxtasks)

+ 8 - 0
examples/peripherals/uart_echo/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/uart_echo_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(uart_echo)

+ 8 - 0
examples/peripherals/uart_events/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/uart_events_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(uart_events)

+ 1 - 3
examples/protocols/aws_iot/subscribe_publish/CMakeLists.txt

@@ -1,13 +1,11 @@
 # The following four lines of boilerplate have to be in your project's CMakeLists
 # in this exact order for cmake to work correctly
 cmake_minimum_required(VERSION 3.5)
-set(CMAKE_TOOLCHAIN_FILE $ENV{IDF_PATH}/toolchain.cmake)
-
-project(subscribe_publish ASM C CXX)
 
 set(MAIN_SRCS main/subscribe_publish_sample.c)
 
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(subscribe_publish)
 
 # Embed the certificate data directly in the built binary
 target_add_binary_data(subscribe_publish.elf main/certs/aws-root-ca.pem TEXT)

+ 13 - 0
examples/protocols/aws_iot/thing_shadow/CMakeLists.txt

@@ -0,0 +1,13 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/thing_shadow_sample.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(thing_shadow)
+
+# Embed the certificate data directly in the built binary
+target_add_binary_data(thing_shadow.elf main/certs/aws-root-ca.pem TEXT)
+target_add_binary_data(thing_shadow.elf main/certs/certificate.pem.crt TEXT)
+target_add_binary_data(thing_shadow.elf main/certs/private.pem.key TEXT)

+ 8 - 0
examples/protocols/coap_client/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/coap_client_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(coap_client)

+ 8 - 0
examples/protocols/coap_server/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/coap_server_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(coap_server)

+ 8 - 0
examples/protocols/http2_request/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/http2_request_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(http2-request)

+ 5 - 0
examples/protocols/http2_request/components/sh2lib/CMakeLists.txt

@@ -0,0 +1,5 @@
+set(COMPONENT_ADD_INCLUDEDIRS .)
+
+set(COMPONENT_SRCDIRS .)
+
+register_component()

+ 8 - 0
examples/protocols/http_request/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/http_request_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(http-request)

+ 14 - 0
examples/protocols/https_request/CMakeLists.txt

@@ -0,0 +1,14 @@
+# The following five lines of boilerplate have to be in your project's
+# CMakeLists in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/https_request_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(https_request)
+
+# Embed the server root certificate into the final binary
+#
+# (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.)
+target_add_binary_data(https_request.elf
+    "main/server_root_cert.pem" TEXT)

+ 8 - 0
examples/protocols/mdns/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/mdns_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(mdns-test)

+ 8 - 0
examples/protocols/openssl_client/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/openssl_client_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(openssl_client)

+ 12 - 0
examples/protocols/openssl_server/CMakeLists.txt

@@ -0,0 +1,12 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/openssl_server_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(openssl_server)
+
+# Embed the certificate & key data directly in the built binary
+target_add_binary_data(openssl_server.elf main/cacert.pem TEXT)
+target_add_binary_data(openssl_server.elf main/prvtkey.pem TEXT)

+ 8 - 0
examples/protocols/pppos_client/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/pppos_client_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(pppos_client)

+ 8 - 0
examples/protocols/sntp/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/sntp_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(sntp)

+ 8 - 0
examples/protocols/udp_multicast/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/udp_multicast_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(udp-multicast)

+ 8 - 0
examples/storage/nvs_rw_blob/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/nvs_blob_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(nvs-rw-blob)

+ 8 - 0
examples/storage/nvs_rw_value/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/nvs_value_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(nvs-rw-value)

+ 8 - 0
examples/storage/sd_card/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/sd_card_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(sd_card)

+ 8 - 0
examples/storage/spiffs/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/spiffs_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(spiffs)

+ 8 - 0
examples/storage/wear_levelling/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/wear_levelling_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(wear_levelling_example)

+ 8 - 0
examples/system/app_trace_to_host/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/app_trace_to_host_test.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(app_trace_to_host_test)

+ 8 - 0
examples/system/base_mac_address/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/base_mac_address_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(base_mac_address)

+ 8 - 0
examples/system/console/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/cmd_wifi.c main/console_example_main.c main/cmd_system.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(console)

+ 8 - 0
examples/system/deep_sleep/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/deep_sleep_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(deep_sleep)

+ 8 - 0
examples/system/gcov/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/gcov_example_func.c main/gcov_example.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(gcov_example)

+ 8 - 0
examples/system/ota/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/ota_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(ota)

+ 8 - 0
examples/system/task_watchdog/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/task_watchdog_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(task_watchdog)

+ 8 - 0
examples/wifi/espnow/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/espnow_example_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(espnow_example)

+ 8 - 0
examples/wifi/iperf/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/cmd_wifi.c main/main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(iperf)

+ 5 - 0
examples/wifi/iperf/components/CMakeLists.txt

@@ -0,0 +1,5 @@
+set(COMPONENT_ADD_INCLUDEDIRS .)
+
+set(COMPONENT_SRCDIRS .)
+
+register_component()

+ 8 - 0
examples/wifi/power_save/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/power_save.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(power_save)

+ 8 - 0
examples/wifi/scan/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/scan.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(scan)

+ 8 - 0
examples/wifi/smart_config/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/smartconfig_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(smart_config)

+ 17 - 0
examples/wifi/wpa2_enterprise/CMakeLists.txt

@@ -0,0 +1,17 @@
+
+# (Automatically converted from project Makefile by convert_to_cmake.py.)
+
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/wpa2_enterprise_main.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(wpa2-enterprise)
+
+# Embed CA, certificate & key directly into binary
+target_add_binary_data(wpa2-enterprise.elf main/wpa2_ca.pem TEXT)
+target_add_binary_data(wpa2-enterprise.elf main/wpa2_client.crt TEXT)
+target_add_binary_data(wpa2-enterprise.elf main/wpa2_client.key TEXT)
+

+ 8 - 0
examples/wifi/wps/CMakeLists.txt

@@ -0,0 +1,8 @@
+# The following four lines of boilerplate have to be in your project's CMakeLists
+# in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+set(MAIN_SRCS main/wps.c)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(wps_example)