From 6771eead80534c51efb2033c04769ef5893b4838 Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Sun, 28 Apr 2019 15:38:46 +0800 Subject: [PATCH] examples: use new component registration api --- components/esp_websocket_client/CMakeLists.txt | 7 +++---- components/esp_wifi/test/CMakeLists.txt | 2 +- .../a2dp_gatts_coex/main/CMakeLists.txt | 10 ++++------ .../bluetooth/a2dp_sink/main/CMakeLists.txt | 9 ++++----- .../bluetooth/a2dp_source/main/CMakeLists.txt | 8 +++----- examples/bluetooth/ble_adv/main/CMakeLists.txt | 6 ++---- .../ble_compatibility_test/main/CMakeLists.txt | 6 ++---- .../ble_eddystone/main/CMakeLists.txt | 8 +++----- .../ble_hid_device_demo/main/CMakeLists.txt | 12 +++++------- .../bluetooth/ble_ibeacon/main/CMakeLists.txt | 8 +++----- .../ble_spp_client/main/CMakeLists.txt | 6 ++---- .../ble_spp_server/main/CMakeLists.txt | 6 ++---- .../throughput_client/main/CMakeLists.txt | 6 ++---- .../throughput_server/main/CMakeLists.txt | 6 ++---- examples/bluetooth/blufi/main/CMakeLists.txt | 8 +++----- .../bluetooth/bt_discovery/main/CMakeLists.txt | 6 ++---- .../bt_spp_acceptor/main/CMakeLists.txt | 6 ++---- .../bt_spp_initiator/main/CMakeLists.txt | 6 ++---- .../bt_spp_vfs_acceptor/main/CMakeLists.txt | 8 +++----- .../bt_spp_vfs_initiator/main/CMakeLists.txt | 8 +++----- .../controller_hci_uart/main/CMakeLists.txt | 6 ++---- .../bluetooth/gatt_client/main/CMakeLists.txt | 6 ++---- .../gatt_security_client/main/CMakeLists.txt | 6 ++---- .../gatt_security_server/main/CMakeLists.txt | 6 ++---- .../bluetooth/gatt_server/main/CMakeLists.txt | 6 ++---- .../main/CMakeLists.txt | 6 ++---- .../gattc_multi_connect/main/CMakeLists.txt | 6 ++---- .../cmake/import_lib/main/CMakeLists.txt | 9 +++------ .../protocol_examples_common/CMakeLists.txt | 7 ++----- examples/ethernet/eth2ap/main/CMakeLists.txt | 8 ++------ examples/ethernet/ethernet/main/CMakeLists.txt | 6 ++---- examples/ethernet/iperf/main/CMakeLists.txt | 8 +++----- examples/get-started/blink/main/CMakeLists.txt | 6 ++---- .../hello_world/main/CMakeLists.txt | 6 ++---- .../internal_communication/main/CMakeLists.txt | 8 +++----- .../mesh/manual_networking/main/CMakeLists.txt | 8 +++----- examples/peripherals/adc/main/CMakeLists.txt | 6 ++---- examples/peripherals/adc2/main/CMakeLists.txt | 6 ++---- .../can_alert_and_recovery/main/CMakeLists.txt | 6 ++---- .../main/CMakeLists.txt | 6 ++---- .../can_network_master/main/CMakeLists.txt | 6 ++---- .../can_network_slave/main/CMakeLists.txt | 6 ++---- .../can/can_self_test/main/CMakeLists.txt | 6 ++---- examples/peripherals/gpio/main/CMakeLists.txt | 6 ++---- .../i2c/i2c_self_test/main/CMakeLists.txt | 6 ++---- .../i2c/i2c_tools/main/CMakeLists.txt | 8 +++----- examples/peripherals/i2s/main/CMakeLists.txt | 6 ++---- .../i2s_adc_dac/main/CMakeLists.txt | 6 ++---- examples/peripherals/ledc/main/CMakeLists.txt | 6 ++---- .../mcpwm_basic_config/main/CMakeLists.txt | 6 ++---- .../mcpwm_bldc_control/main/CMakeLists.txt | 6 ++---- .../main/CMakeLists.txt | 6 ++---- .../mcpwm_servo_control/main/CMakeLists.txt | 6 ++---- examples/peripherals/pcnt/main/CMakeLists.txt | 6 ++---- .../rmt_nec_tx_rx/main/CMakeLists.txt | 6 ++---- .../peripherals/rmt_tx/main/CMakeLists.txt | 6 ++---- .../host/components/esp_slave/CMakeLists.txt | 9 +++------ .../peripherals/sdio/host/main/CMakeLists.txt | 6 ++---- .../peripherals/sdio/slave/main/CMakeLists.txt | 6 ++---- .../peripherals/sigmadelta/main/CMakeLists.txt | 6 ++---- .../peripherals/spi_master/main/CMakeLists.txt | 14 +++++--------- .../spi_slave/receiver/main/CMakeLists.txt | 6 ++---- .../spi_slave/sender/main/CMakeLists.txt | 6 ++---- .../timer_group/main/CMakeLists.txt | 6 ++---- .../touch_pad_interrupt/main/CMakeLists.txt | 6 ++---- .../touch_pad_read/main/CMakeLists.txt | 6 ++---- .../uart/nmea0183_parser/main/CMakeLists.txt | 8 +++----- .../uart_async_rxtxtasks/main/CMakeLists.txt | 6 ++---- .../uart/uart_echo/main/CMakeLists.txt | 6 ++---- .../uart/uart_echo_rs485/main/CMakeLists.txt | 6 ++---- .../uart/uart_events/main/CMakeLists.txt | 6 ++---- .../uart/uart_select/main/CMakeLists.txt | 6 ++---- .../asio/chat_client/main/CMakeLists.txt | 6 ++---- .../asio/chat_server/main/CMakeLists.txt | 6 ++---- .../asio/tcp_echo_server/main/CMakeLists.txt | 6 ++---- .../asio/udp_echo_server/main/CMakeLists.txt | 6 ++---- .../protocols/coap_client/main/CMakeLists.txt | 6 ++---- .../protocols/coap_server/main/CMakeLists.txt | 6 ++---- .../esp_http_client/main/CMakeLists.txt | 10 +++------- .../components/sh2lib/CMakeLists.txt | 12 ++++-------- .../http2_request/main/CMakeLists.txt | 6 ++---- .../protocols/http_request/main/CMakeLists.txt | 6 ++---- .../advanced_tests/main/CMakeLists.txt | 8 +++----- .../file_serving/main/CMakeLists.txt | 9 +++------ .../persistent_sockets/main/CMakeLists.txt | 6 ++---- .../restful_server/main/CMakeLists.txt | 7 +++---- .../http_server/simple/main/CMakeLists.txt | 6 ++---- .../https_mbedtls/main/CMakeLists.txt | 10 +++------- .../https_request/main/CMakeLists.txt | 10 +++------- .../protocols/https_server/main/CMakeLists.txt | 12 ++++-------- examples/protocols/mdns/main/CMakeLists.txt | 6 ++---- .../modbus_master/main/CMakeLists.txt | 10 ++++------ .../protocols/modbus_slave/main/CMakeLists.txt | 8 +++----- .../mqtt/publish_test/main/CMakeLists.txt | 6 ++---- .../protocols/mqtt/ssl/main/CMakeLists.txt | 6 ++---- .../mqtt/ssl_mutual_auth/main/CMakeLists.txt | 6 ++---- .../protocols/mqtt/tcp/main/CMakeLists.txt | 6 ++---- examples/protocols/mqtt/ws/main/CMakeLists.txt | 6 ++---- .../protocols/mqtt/wss/main/CMakeLists.txt | 6 ++---- .../openssl_client/main/CMakeLists.txt | 6 ++---- .../openssl_server/main/CMakeLists.txt | 10 +++------- .../components/modem/CMakeLists.txt | 18 +++++++----------- .../protocols/pppos_client/main/CMakeLists.txt | 6 ++---- examples/protocols/sntp/main/CMakeLists.txt | 6 ++---- .../sockets/tcp_client/main/CMakeLists.txt | 6 ++---- .../sockets/tcp_server/main/CMakeLists.txt | 6 ++---- .../sockets/udp_client/main/CMakeLists.txt | 6 ++---- .../sockets/udp_multicast/main/CMakeLists.txt | 6 ++---- .../sockets/udp_server/main/CMakeLists.txt | 6 ++---- .../protocols/websocket/main/CMakeLists.txt | 6 ++---- .../provisioning/ble_prov/main/CMakeLists.txt | 10 ++++------ .../console_prov/main/CMakeLists.txt | 10 ++++------ .../custom_provisioning/CMakeLists.txt | 13 +++++-------- .../custom_config/main/CMakeLists.txt | 10 ++++------ .../provisioning/manager/main/CMakeLists.txt | 6 ++---- .../softap_prov/main/CMakeLists.txt | 10 ++++------ .../storage/nvs_rw_blob/main/CMakeLists.txt | 6 ++---- .../storage/nvs_rw_value/main/CMakeLists.txt | 6 ++---- .../partition_find/main/CMakeLists.txt | 9 +++------ .../partition_mmap/main/CMakeLists.txt | 6 ++---- .../partition_ops/main/CMakeLists.txt | 6 ++---- examples/storage/parttool/main/CMakeLists.txt | 6 ++---- examples/storage/sd_card/main/CMakeLists.txt | 6 ++---- .../storage/semihost_vfs/main/CMakeLists.txt | 5 +++-- examples/storage/spiffs/main/CMakeLists.txt | 6 ++---- examples/storage/spiffsgen/main/CMakeLists.txt | 6 ++---- .../storage/wear_levelling/main/CMakeLists.txt | 6 ++---- .../app_trace_to_host/main/CMakeLists.txt | 6 ++---- .../base_mac_address/main/CMakeLists.txt | 6 ++---- .../console/components/cmd_nvs/CMakeLists.txt | 10 +++------- .../components/cmd_system/CMakeLists.txt | 10 +++------- examples/system/console/main/CMakeLists.txt | 8 +++----- .../system/cpp_exceptions/main/CMakeLists.txt | 6 ++---- .../system/cpp_pthread/main/CMakeLists.txt | 6 ++---- examples/system/deep_sleep/main/CMakeLists.txt | 6 ++---- .../default_event_loop/main/CMakeLists.txt | 6 ++---- .../user_event_loops/main/CMakeLists.txt | 6 ++---- examples/system/esp_timer/main/CMakeLists.txt | 6 ++---- .../real_time_stats/main/CMakeLists.txt | 6 ++---- examples/system/gcov/main/CMakeLists.txt | 8 +++----- examples/system/himem/main/CMakeLists.txt | 6 ++---- .../system/light_sleep/main/CMakeLists.txt | 6 ++---- .../system/network_tests/main/CMakeLists.txt | 6 ++---- .../ota/advanced_https_ota/main/CMakeLists.txt | 13 ++++--------- .../ota/native_ota_example/main/CMakeLists.txt | 9 +++------ .../system/ota/otatool/main/CMakeLists.txt | 6 ++---- .../ota/simple_ota_example/main/CMakeLists.txt | 10 +++------- examples/system/select/main/CMakeLists.txt | 6 ++---- .../system/sysview_tracing/main/CMakeLists.txt | 6 ++---- .../main/CMakeLists.txt | 6 ++---- .../system/task_watchdog/main/CMakeLists.txt | 6 ++---- examples/system/ulp/main/CMakeLists.txt | 10 +++------- examples/system/ulp_adc/main/CMakeLists.txt | 12 ++++-------- .../components/testable/CMakeLists.txt | 6 ++---- .../components/testable/test/CMakeLists.txt | 9 +++------ examples/system/unit_test/main/CMakeLists.txt | 6 ++---- .../system/unit_test/test/main/CMakeLists.txt | 6 ++---- examples/wifi/espnow/main/CMakeLists.txt | 6 ++---- .../getting_started/softAP/main/CMakeLists.txt | 6 ++---- .../station/main/CMakeLists.txt | 6 ++---- .../wifi/iperf/components/iperf/CMakeLists.txt | 10 +++------- examples/wifi/iperf/main/CMakeLists.txt | 8 +++----- examples/wifi/power_save/main/CMakeLists.txt | 6 ++---- examples/wifi/scan/main/CMakeLists.txt | 6 ++---- .../components/pcap/CMakeLists.txt | 7 ++----- .../wifi/simple_sniffer/main/CMakeLists.txt | 13 +++---------- examples/wifi/smart_config/main/CMakeLists.txt | 6 ++---- .../wifi/wpa2_enterprise/main/CMakeLists.txt | 10 +++------- examples/wifi/wps/main/CMakeLists.txt | 6 ++---- 169 files changed, 409 insertions(+), 788 deletions(-) diff --git a/components/esp_websocket_client/CMakeLists.txt b/components/esp_websocket_client/CMakeLists.txt index 723199ce0f..f366a278d3 100644 --- a/components/esp_websocket_client/CMakeLists.txt +++ b/components/esp_websocket_client/CMakeLists.txt @@ -1,4 +1,3 @@ -set(COMPONENT_SRCS "esp_websocket_client.c") -set(COMPONENT_ADD_INCLUDEDIRS "include") -set(COMPONENT_REQUIRES lwip esp-tls tcp_transport nghttp) -register_component() +idf_component_register(SRCS "esp_websocket_client.c" + INCLUDE_DIRS "include" + REQUIRES lwip esp-tls tcp_transport nghttp) diff --git a/components/esp_wifi/test/CMakeLists.txt b/components/esp_wifi/test/CMakeLists.txt index a3ff3757c3..cf98dd8137 100644 --- a/components/esp_wifi/test/CMakeLists.txt +++ b/components/esp_wifi/test/CMakeLists.txt @@ -1,4 +1,4 @@ -idf_component_register(SRCDIRS "." +idf_component_register(SRC_DIRS "." INCLUDE_DIRS "." "${CMAKE_CURRENT_BINARY_DIR}" REQUIRES unity test_utils nvs_flash ulp esp_common) diff --git a/examples/bluetooth/a2dp_gatts_coex/main/CMakeLists.txt b/examples/bluetooth/a2dp_gatts_coex/main/CMakeLists.txt index a55538b5fb..55f2d445aa 100644 --- a/examples/bluetooth/a2dp_gatts_coex/main/CMakeLists.txt +++ b/examples/bluetooth/a2dp_gatts_coex/main/CMakeLists.txt @@ -1,6 +1,4 @@ -set(COMPONENT_SRCS "bt_app_av.c" - "bt_app_core.c" - "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "bt_app_av.c" + "bt_app_core.c" + "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/a2dp_sink/main/CMakeLists.txt b/examples/bluetooth/a2dp_sink/main/CMakeLists.txt index a55538b5fb..d1d916efbd 100644 --- a/examples/bluetooth/a2dp_sink/main/CMakeLists.txt +++ b/examples/bluetooth/a2dp_sink/main/CMakeLists.txt @@ -1,6 +1,5 @@ -set(COMPONENT_SRCS "bt_app_av.c" - "bt_app_core.c" - "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") +idf_component_register(SRCS "bt_app_av.c" + "bt_app_core.c" + "main.c" + INCLUDE_DIRS ".") -register_component() diff --git a/examples/bluetooth/a2dp_source/main/CMakeLists.txt b/examples/bluetooth/a2dp_source/main/CMakeLists.txt index 98b05a101b..d0a3885ddb 100644 --- a/examples/bluetooth/a2dp_source/main/CMakeLists.txt +++ b/examples/bluetooth/a2dp_source/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "bt_app_core.c" - "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "bt_app_core.c" + "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/ble_adv/main/CMakeLists.txt b/examples/bluetooth/ble_adv/main/CMakeLists.txt index d005e60123..494d32308b 100644 --- a/examples/bluetooth/ble_adv/main/CMakeLists.txt +++ b/examples/bluetooth/ble_adv/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_bt.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_bt.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/ble_compatibility_test/main/CMakeLists.txt b/examples/bluetooth/ble_compatibility_test/main/CMakeLists.txt index 3435b4c563..99553fec31 100644 --- a/examples/bluetooth/ble_compatibility_test/main/CMakeLists.txt +++ b/examples/bluetooth/ble_compatibility_test/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "ble_compatibility_test.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "ble_compatibility_test.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/ble_eddystone/main/CMakeLists.txt b/examples/bluetooth/ble_eddystone/main/CMakeLists.txt index 66a4e1aa6c..cdd852c570 100644 --- a/examples/bluetooth/ble_eddystone/main/CMakeLists.txt +++ b/examples/bluetooth/ble_eddystone/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "esp_eddystone_api.c" - "esp_eddystone_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS "") - -register_component() +idf_component_register(SRCS "esp_eddystone_api.c" + "esp_eddystone_demo.c" + INCLUDE_DIRS "") \ No newline at end of file diff --git a/examples/bluetooth/ble_hid_device_demo/main/CMakeLists.txt b/examples/bluetooth/ble_hid_device_demo/main/CMakeLists.txt index 6445d3c5ef..efba49f6b7 100644 --- a/examples/bluetooth/ble_hid_device_demo/main/CMakeLists.txt +++ b/examples/bluetooth/ble_hid_device_demo/main/CMakeLists.txt @@ -1,10 +1,8 @@ -set(COMPONENT_SRCS "ble_hidd_demo_main.c" - "esp_hidd_prf_api.c" - "hid_dev.c" - "hid_device_le_prf.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "ble_hidd_demo_main.c" + "esp_hidd_prf_api.c" + "hid_dev.c" + "hid_device_le_prf.c" + INCLUDE_DIRS ".") if(GCC_NOT_5_2_0) target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-const-variable) diff --git a/examples/bluetooth/ble_ibeacon/main/CMakeLists.txt b/examples/bluetooth/ble_ibeacon/main/CMakeLists.txt index 1ae1a02e64..50293e2a7b 100644 --- a/examples/bluetooth/ble_ibeacon/main/CMakeLists.txt +++ b/examples/bluetooth/ble_ibeacon/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "esp_ibeacon_api.c" - "ibeacon_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "esp_ibeacon_api.c" + "ibeacon_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/ble_spp_client/main/CMakeLists.txt b/examples/bluetooth/ble_spp_client/main/CMakeLists.txt index de584f3977..1b83a293fa 100644 --- a/examples/bluetooth/ble_spp_client/main/CMakeLists.txt +++ b/examples/bluetooth/ble_spp_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "spp_client_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "spp_client_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/ble_spp_server/main/CMakeLists.txt b/examples/bluetooth/ble_spp_server/main/CMakeLists.txt index 99f35ee072..be4f67ba8d 100644 --- a/examples/bluetooth/ble_spp_server/main/CMakeLists.txt +++ b/examples/bluetooth/ble_spp_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "ble_spp_server_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "ble_spp_server_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/ble_throughput/throughput_client/main/CMakeLists.txt b/examples/bluetooth/ble_throughput/throughput_client/main/CMakeLists.txt index 1fe275526d..e4c37ee280 100644 --- a/examples/bluetooth/ble_throughput/throughput_client/main/CMakeLists.txt +++ b/examples/bluetooth/ble_throughput/throughput_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "example_ble_client_throughput.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_ble_client_throughput.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/ble_throughput/throughput_server/main/CMakeLists.txt b/examples/bluetooth/ble_throughput/throughput_server/main/CMakeLists.txt index 3c1f62ac89..c54e45c928 100644 --- a/examples/bluetooth/ble_throughput/throughput_server/main/CMakeLists.txt +++ b/examples/bluetooth/ble_throughput/throughput_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "example_ble_server_throughput.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_ble_server_throughput.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/blufi/main/CMakeLists.txt b/examples/bluetooth/blufi/main/CMakeLists.txt index cbb9b24c36..8e40bfbf2f 100644 --- a/examples/bluetooth/blufi/main/CMakeLists.txt +++ b/examples/bluetooth/blufi/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "blufi_example_main.c" - "blufi_security.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "blufi_example_main.c" + "blufi_security.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/bt_discovery/main/CMakeLists.txt b/examples/bluetooth/bt_discovery/main/CMakeLists.txt index 68ddbfb4c8..4bc23a96f4 100644 --- a/examples/bluetooth/bt_discovery/main/CMakeLists.txt +++ b/examples/bluetooth/bt_discovery/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "bt_discovery.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "bt_discovery.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/bt_spp_acceptor/main/CMakeLists.txt b/examples/bluetooth/bt_spp_acceptor/main/CMakeLists.txt index 0694503f92..a71f85ba7c 100644 --- a/examples/bluetooth/bt_spp_acceptor/main/CMakeLists.txt +++ b/examples/bluetooth/bt_spp_acceptor/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "example_spp_acceptor_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_spp_acceptor_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/bt_spp_initiator/main/CMakeLists.txt b/examples/bluetooth/bt_spp_initiator/main/CMakeLists.txt index 1eae1b74c9..09a976ad1c 100644 --- a/examples/bluetooth/bt_spp_initiator/main/CMakeLists.txt +++ b/examples/bluetooth/bt_spp_initiator/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "example_spp_initiator_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_spp_initiator_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/bt_spp_vfs_acceptor/main/CMakeLists.txt b/examples/bluetooth/bt_spp_vfs_acceptor/main/CMakeLists.txt index b224db80b6..369e404a15 100644 --- a/examples/bluetooth/bt_spp_vfs_acceptor/main/CMakeLists.txt +++ b/examples/bluetooth/bt_spp_vfs_acceptor/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "example_spp_vfs_acceptor_demo.c" - "spp_task.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_spp_vfs_acceptor_demo.c" + "spp_task.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/bt_spp_vfs_initiator/main/CMakeLists.txt b/examples/bluetooth/bt_spp_vfs_initiator/main/CMakeLists.txt index f3b9111353..03781e4786 100644 --- a/examples/bluetooth/bt_spp_vfs_initiator/main/CMakeLists.txt +++ b/examples/bluetooth/bt_spp_vfs_initiator/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "example_spp_vfs_initiator_demo.c" - "spp_task.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_spp_vfs_initiator_demo.c" + "spp_task.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/controller_hci_uart/main/CMakeLists.txt b/examples/bluetooth/controller_hci_uart/main/CMakeLists.txt index 2f40a64c69..b4eacc768a 100644 --- a/examples/bluetooth/controller_hci_uart/main/CMakeLists.txt +++ b/examples/bluetooth/controller_hci_uart/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "controller_hci_uart_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "controller_hci_uart_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/gatt_client/main/CMakeLists.txt b/examples/bluetooth/gatt_client/main/CMakeLists.txt index 7c79edceaa..82a30b2f71 100644 --- a/examples/bluetooth/gatt_client/main/CMakeLists.txt +++ b/examples/bluetooth/gatt_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "gattc_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "gattc_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/gatt_security_client/main/CMakeLists.txt b/examples/bluetooth/gatt_security_client/main/CMakeLists.txt index 32cea7e2e3..691e1edd29 100644 --- a/examples/bluetooth/gatt_security_client/main/CMakeLists.txt +++ b/examples/bluetooth/gatt_security_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "example_ble_sec_gattc_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_ble_sec_gattc_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/gatt_security_server/main/CMakeLists.txt b/examples/bluetooth/gatt_security_server/main/CMakeLists.txt index 87df03c692..6514591112 100644 --- a/examples/bluetooth/gatt_security_server/main/CMakeLists.txt +++ b/examples/bluetooth/gatt_security_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "example_ble_sec_gatts_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_ble_sec_gatts_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/gatt_server/main/CMakeLists.txt b/examples/bluetooth/gatt_server/main/CMakeLists.txt index d23e5ffc7d..e950c9ecd0 100644 --- a/examples/bluetooth/gatt_server/main/CMakeLists.txt +++ b/examples/bluetooth/gatt_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "gatts_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "gatts_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/gatt_server_service_table/main/CMakeLists.txt b/examples/bluetooth/gatt_server_service_table/main/CMakeLists.txt index 7588b5a7a1..fbe553576b 100644 --- a/examples/bluetooth/gatt_server_service_table/main/CMakeLists.txt +++ b/examples/bluetooth/gatt_server_service_table/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "gatts_table_creat_demo.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "gatts_table_creat_demo.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/gattc_multi_connect/main/CMakeLists.txt b/examples/bluetooth/gattc_multi_connect/main/CMakeLists.txt index 19dcf60d3a..826febe746 100644 --- a/examples/bluetooth/gattc_multi_connect/main/CMakeLists.txt +++ b/examples/bluetooth/gattc_multi_connect/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "gattc_multi_connect.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "gattc_multi_connect.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/build_system/cmake/import_lib/main/CMakeLists.txt b/examples/build_system/cmake/import_lib/main/CMakeLists.txt index fb136b8b97..6c60c8f980 100644 --- a/examples/build_system/cmake/import_lib/main/CMakeLists.txt +++ b/examples/build_system/cmake/import_lib/main/CMakeLists.txt @@ -1,9 +1,6 @@ -set(COMPONENT_SRCS "main.cpp") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -set(COMPONENT_EMBED_TXTFILES "sample.xml") - -register_component() +idf_component_register(SRCS "main.cpp" + INCLUDE_DIRS "." + EMBED_TXTFILES "sample.xml") # Build static library, do not build test executables option(BUILD_SHARED_LIBS OFF) diff --git a/examples/common_components/protocol_examples_common/CMakeLists.txt b/examples/common_components/protocol_examples_common/CMakeLists.txt index 784909da03..0ccb219b4a 100644 --- a/examples/common_components/protocol_examples_common/CMakeLists.txt +++ b/examples/common_components/protocol_examples_common/CMakeLists.txt @@ -1,5 +1,2 @@ -set(COMPONENT_SRCS "connect.c" - "stdin_out.c") -set(COMPONENT_ADD_INCLUDEDIRS "include") - -register_component() +idf_component_register(SRCS "connect.c" "stdin_out.c" + INCLUDE_DIRS "include") diff --git a/examples/ethernet/eth2ap/main/CMakeLists.txt b/examples/ethernet/eth2ap/main/CMakeLists.txt index aaf55bea54..5dbbb14c2d 100644 --- a/examples/ethernet/eth2ap/main/CMakeLists.txt +++ b/examples/ethernet/eth2ap/main/CMakeLists.txt @@ -1,6 +1,2 @@ - -set(COMPONENT_SRCS "eth2ap_example_main.c") - -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "eth2ap_example_main.c" + INCLUDE_DIRS ".") diff --git a/examples/ethernet/ethernet/main/CMakeLists.txt b/examples/ethernet/ethernet/main/CMakeLists.txt index 8c0c9fa0fc..8bc01f1bb4 100644 --- a/examples/ethernet/ethernet/main/CMakeLists.txt +++ b/examples/ethernet/ethernet/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "ethernet_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "ethernet_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/ethernet/iperf/main/CMakeLists.txt b/examples/ethernet/iperf/main/CMakeLists.txt index 16ecc3272c..aa66030901 100644 --- a/examples/ethernet/iperf/main/CMakeLists.txt +++ b/examples/ethernet/iperf/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "cmd_ethernet.c" - "iperf_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "cmd_ethernet.c" + "iperf_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/get-started/blink/main/CMakeLists.txt b/examples/get-started/blink/main/CMakeLists.txt index 69f12a3847..413c3b5141 100644 --- a/examples/get-started/blink/main/CMakeLists.txt +++ b/examples/get-started/blink/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "blink.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "blink.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/get-started/hello_world/main/CMakeLists.txt b/examples/get-started/hello_world/main/CMakeLists.txt index b79b831950..c299e03782 100644 --- a/examples/get-started/hello_world/main/CMakeLists.txt +++ b/examples/get-started/hello_world/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "hello_world_main.c") -set(COMPONENT_ADD_INCLUDEDIRS "") - -register_component() \ No newline at end of file +idf_component_register(SRCS "hello_world_main.c" + INCLUDE_DIRS "") \ No newline at end of file diff --git a/examples/mesh/internal_communication/main/CMakeLists.txt b/examples/mesh/internal_communication/main/CMakeLists.txt index 451eeceed6..686ab05acf 100644 --- a/examples/mesh/internal_communication/main/CMakeLists.txt +++ b/examples/mesh/internal_communication/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "mesh_light.c" - "mesh_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ". include") - -register_component() +idf_component_register(SRCS "mesh_light.c" + "mesh_main.c" + INCLUDE_DIRS "." "include") diff --git a/examples/mesh/manual_networking/main/CMakeLists.txt b/examples/mesh/manual_networking/main/CMakeLists.txt index 1ae57b28ac..686ab05acf 100644 --- a/examples/mesh/manual_networking/main/CMakeLists.txt +++ b/examples/mesh/manual_networking/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "mesh_light.c" - "mesh_main.c") -set(COMPONENT_ADD_INCLUDEDIRS "." "include") - -register_component() +idf_component_register(SRCS "mesh_light.c" + "mesh_main.c" + INCLUDE_DIRS "." "include") diff --git a/examples/peripherals/adc/main/CMakeLists.txt b/examples/peripherals/adc/main/CMakeLists.txt index 9b5d48fc60..035e5bd270 100644 --- a/examples/peripherals/adc/main/CMakeLists.txt +++ b/examples/peripherals/adc/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "adc1_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "adc1_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/adc2/main/CMakeLists.txt b/examples/peripherals/adc2/main/CMakeLists.txt index 1d7776ecf0..5a6c87d577 100644 --- a/examples/peripherals/adc2/main/CMakeLists.txt +++ b/examples/peripherals/adc2/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "adc2_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "adc2_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/can/can_alert_and_recovery/main/CMakeLists.txt b/examples/peripherals/can/can_alert_and_recovery/main/CMakeLists.txt index cf9bf40a99..ab23bf60fb 100644 --- a/examples/peripherals/can/can_alert_and_recovery/main/CMakeLists.txt +++ b/examples/peripherals/can/can_alert_and_recovery/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "can_alert_and_recovery_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "can_alert_and_recovery_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/can/can_network/can_network_listen_only/main/CMakeLists.txt b/examples/peripherals/can/can_network/can_network_listen_only/main/CMakeLists.txt index 5eab299b00..191642e1d1 100644 --- a/examples/peripherals/can/can_network/can_network_listen_only/main/CMakeLists.txt +++ b/examples/peripherals/can/can_network/can_network_listen_only/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "can_network_example_listen_only_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "can_network_example_listen_only_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/can/can_network/can_network_master/main/CMakeLists.txt b/examples/peripherals/can/can_network/can_network_master/main/CMakeLists.txt index f0dc1d6a79..31a67ddcb9 100644 --- a/examples/peripherals/can/can_network/can_network_master/main/CMakeLists.txt +++ b/examples/peripherals/can/can_network/can_network_master/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "can_network_example_master_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "can_network_example_master_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/can/can_network/can_network_slave/main/CMakeLists.txt b/examples/peripherals/can/can_network/can_network_slave/main/CMakeLists.txt index 4a002fbfc3..5ade11d5b5 100644 --- a/examples/peripherals/can/can_network/can_network_slave/main/CMakeLists.txt +++ b/examples/peripherals/can/can_network/can_network_slave/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "can_network_example_slave_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "can_network_example_slave_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/can/can_self_test/main/CMakeLists.txt b/examples/peripherals/can/can_self_test/main/CMakeLists.txt index 21db765a8f..5c3f85e0a5 100644 --- a/examples/peripherals/can/can_self_test/main/CMakeLists.txt +++ b/examples/peripherals/can/can_self_test/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "can_self_test_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "can_self_test_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/gpio/main/CMakeLists.txt b/examples/peripherals/gpio/main/CMakeLists.txt index d768cb8252..d33d5e1716 100644 --- a/examples/peripherals/gpio/main/CMakeLists.txt +++ b/examples/peripherals/gpio/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "gpio_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "gpio_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/i2c/i2c_self_test/main/CMakeLists.txt b/examples/peripherals/i2c/i2c_self_test/main/CMakeLists.txt index 02386f7197..4dc828aacc 100644 --- a/examples/peripherals/i2c/i2c_self_test/main/CMakeLists.txt +++ b/examples/peripherals/i2c/i2c_self_test/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "i2c_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "i2c_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/i2c/i2c_tools/main/CMakeLists.txt b/examples/peripherals/i2c/i2c_tools/main/CMakeLists.txt index 50cdc09826..fed3a94434 100644 --- a/examples/peripherals/i2c/i2c_tools/main/CMakeLists.txt +++ b/examples/peripherals/i2c/i2c_tools/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "i2ctools_example_main.c" - "cmd_i2ctools.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "i2ctools_example_main.c" + "cmd_i2ctools.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/i2s/main/CMakeLists.txt b/examples/peripherals/i2s/main/CMakeLists.txt index dbb7b172a3..5233689fb2 100644 --- a/examples/peripherals/i2s/main/CMakeLists.txt +++ b/examples/peripherals/i2s/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "i2s_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "i2s_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/i2s_adc_dac/main/CMakeLists.txt b/examples/peripherals/i2s_adc_dac/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/peripherals/i2s_adc_dac/main/CMakeLists.txt +++ b/examples/peripherals/i2s_adc_dac/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/ledc/main/CMakeLists.txt b/examples/peripherals/ledc/main/CMakeLists.txt index 6405eb95ff..f6064011cc 100644 --- a/examples/peripherals/ledc/main/CMakeLists.txt +++ b/examples/peripherals/ledc/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "ledc_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "ledc_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/mcpwm/mcpwm_basic_config/main/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_basic_config/main/CMakeLists.txt index d5fdbf5600..ec236fe844 100644 --- a/examples/peripherals/mcpwm/mcpwm_basic_config/main/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_basic_config/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "mcpwm_basic_config_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "mcpwm_basic_config_example.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/mcpwm/mcpwm_bldc_control/main/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_bldc_control/main/CMakeLists.txt index a52ad94513..3f7cedf8d2 100644 --- a/examples/peripherals/mcpwm/mcpwm_bldc_control/main/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_bldc_control/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "mcpwm_bldc_control_hall_sensor_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "mcpwm_bldc_control_hall_sensor_example.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/mcpwm/mcpwm_brushed_dc_control/main/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_brushed_dc_control/main/CMakeLists.txt index 1259035cbf..81ecd07a8f 100644 --- a/examples/peripherals/mcpwm/mcpwm_brushed_dc_control/main/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_brushed_dc_control/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "mcpwm_brushed_dc_control_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "mcpwm_brushed_dc_control_example.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/mcpwm/mcpwm_servo_control/main/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_servo_control/main/CMakeLists.txt index c8fa3d96b9..7a6efda90a 100644 --- a/examples/peripherals/mcpwm/mcpwm_servo_control/main/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_servo_control/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "mcpwm_servo_control_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "mcpwm_servo_control_example.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/pcnt/main/CMakeLists.txt b/examples/peripherals/pcnt/main/CMakeLists.txt index 2bd2779553..11ace9793f 100644 --- a/examples/peripherals/pcnt/main/CMakeLists.txt +++ b/examples/peripherals/pcnt/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "pcnt_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "pcnt_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/rmt_nec_tx_rx/main/CMakeLists.txt b/examples/peripherals/rmt_nec_tx_rx/main/CMakeLists.txt index 80c75b2285..907a16c057 100644 --- a/examples/peripherals/rmt_nec_tx_rx/main/CMakeLists.txt +++ b/examples/peripherals/rmt_nec_tx_rx/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "infrared_nec_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "infrared_nec_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/rmt_tx/main/CMakeLists.txt b/examples/peripherals/rmt_tx/main/CMakeLists.txt index a0a9147a2a..ad48214028 100644 --- a/examples/peripherals/rmt_tx/main/CMakeLists.txt +++ b/examples/peripherals/rmt_tx/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "rmt_tx_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "rmt_tx_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/sdio/host/components/esp_slave/CMakeLists.txt b/examples/peripherals/sdio/host/components/esp_slave/CMakeLists.txt index 1cda8805cb..9f5c38bbaf 100644 --- a/examples/peripherals/sdio/host/components/esp_slave/CMakeLists.txt +++ b/examples/peripherals/sdio/host/components/esp_slave/CMakeLists.txt @@ -1,6 +1,3 @@ -set(COMPONENT_SRCS "esp_slave.c") -set(COMPONENT_ADD_INCLUDEDIRS "include") - -set(COMPONENT_REQUIRES driver sdmmc) - -register_component() +idf_component_register(SRCS "esp_slave.c" + INCLUDE_DIRS "include" + REQUIRES driver sdmmc) \ No newline at end of file diff --git a/examples/peripherals/sdio/host/main/CMakeLists.txt b/examples/peripherals/sdio/host/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/peripherals/sdio/host/main/CMakeLists.txt +++ b/examples/peripherals/sdio/host/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/sdio/slave/main/CMakeLists.txt b/examples/peripherals/sdio/slave/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/peripherals/sdio/slave/main/CMakeLists.txt +++ b/examples/peripherals/sdio/slave/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/sigmadelta/main/CMakeLists.txt b/examples/peripherals/sigmadelta/main/CMakeLists.txt index 1b0f2299f0..52abe2822d 100644 --- a/examples/peripherals/sigmadelta/main/CMakeLists.txt +++ b/examples/peripherals/sigmadelta/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "sigmadelta_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "sigmadelta_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/spi_master/main/CMakeLists.txt b/examples/peripherals/spi_master/main/CMakeLists.txt index 806ccae2b6..6d1a795b48 100644 --- a/examples/peripherals/spi_master/main/CMakeLists.txt +++ b/examples/peripherals/spi_master/main/CMakeLists.txt @@ -1,9 +1,5 @@ -set(COMPONENT_SRCS "decode_image.c" - "pretty_effect.c" - "spi_master_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - - -set(COMPONENT_EMBED_FILES image.jpg) - -register_component() +idf_component_register(SRCS "decode_image.c" + "pretty_effect.c" + "spi_master_example_main.c" + INCLUDE_DIRS "." + EMBED_FILES image.jpg) \ No newline at end of file diff --git a/examples/peripherals/spi_slave/receiver/main/CMakeLists.txt b/examples/peripherals/spi_slave/receiver/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/peripherals/spi_slave/receiver/main/CMakeLists.txt +++ b/examples/peripherals/spi_slave/receiver/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/spi_slave/sender/main/CMakeLists.txt b/examples/peripherals/spi_slave/sender/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/peripherals/spi_slave/sender/main/CMakeLists.txt +++ b/examples/peripherals/spi_slave/sender/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/timer_group/main/CMakeLists.txt b/examples/peripherals/timer_group/main/CMakeLists.txt index 9a96ce9068..9a07f9eb72 100644 --- a/examples/peripherals/timer_group/main/CMakeLists.txt +++ b/examples/peripherals/timer_group/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "timer_group_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "timer_group_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/touch_pad_interrupt/main/CMakeLists.txt b/examples/peripherals/touch_pad_interrupt/main/CMakeLists.txt index b77bf9c7be..df4240c344 100644 --- a/examples/peripherals/touch_pad_interrupt/main/CMakeLists.txt +++ b/examples/peripherals/touch_pad_interrupt/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "tp_interrupt_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "tp_interrupt_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/touch_pad_read/main/CMakeLists.txt b/examples/peripherals/touch_pad_read/main/CMakeLists.txt index b556e8c0ee..dad0c4905c 100644 --- a/examples/peripherals/touch_pad_read/main/CMakeLists.txt +++ b/examples/peripherals/touch_pad_read/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "tp_read_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "tp_read_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/uart/nmea0183_parser/main/CMakeLists.txt b/examples/peripherals/uart/nmea0183_parser/main/CMakeLists.txt index a8c42b8a71..b06050f468 100644 --- a/examples/peripherals/uart/nmea0183_parser/main/CMakeLists.txt +++ b/examples/peripherals/uart/nmea0183_parser/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "nmea_parser_example_main.c" - "nmea_parser.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "nmea_parser_example_main.c" + "nmea_parser.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/uart/uart_async_rxtxtasks/main/CMakeLists.txt b/examples/peripherals/uart/uart_async_rxtxtasks/main/CMakeLists.txt index b572323523..7cfd9876ee 100644 --- a/examples/peripherals/uart/uart_async_rxtxtasks/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_async_rxtxtasks/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "uart_async_rxtxtasks_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "uart_async_rxtxtasks_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/uart/uart_echo/main/CMakeLists.txt b/examples/peripherals/uart/uart_echo/main/CMakeLists.txt index 1ca803f131..b3eac5eff9 100644 --- a/examples/peripherals/uart/uart_echo/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_echo/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "uart_echo_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "uart_echo_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/uart/uart_echo_rs485/main/CMakeLists.txt b/examples/peripherals/uart/uart_echo_rs485/main/CMakeLists.txt index 8b3393049e..ef96bc63f1 100644 --- a/examples/peripherals/uart/uart_echo_rs485/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_echo_rs485/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "rs485_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "rs485_example.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/uart/uart_events/main/CMakeLists.txt b/examples/peripherals/uart/uart_events/main/CMakeLists.txt index 5a408ef1ef..44d8838503 100644 --- a/examples/peripherals/uart/uart_events/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_events/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "uart_events_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "uart_events_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/peripherals/uart/uart_select/main/CMakeLists.txt b/examples/peripherals/uart/uart_select/main/CMakeLists.txt index 4e3ae00def..8f1897f23f 100644 --- a/examples/peripherals/uart/uart_select/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_select/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "uart_select_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "uart_select_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/asio/chat_client/main/CMakeLists.txt b/examples/protocols/asio/chat_client/main/CMakeLists.txt index 25419de4a8..d92c9a8ae9 100644 --- a/examples/protocols/asio/chat_client/main/CMakeLists.txt +++ b/examples/protocols/asio/chat_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "chat_client.cpp") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "chat_client.cpp" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/asio/chat_server/main/CMakeLists.txt b/examples/protocols/asio/chat_server/main/CMakeLists.txt index 7e44a9039f..9042b223a6 100644 --- a/examples/protocols/asio/chat_server/main/CMakeLists.txt +++ b/examples/protocols/asio/chat_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "chat_server.cpp") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "chat_server.cpp" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/asio/tcp_echo_server/main/CMakeLists.txt b/examples/protocols/asio/tcp_echo_server/main/CMakeLists.txt index 04c3c94d9a..ef518dc723 100644 --- a/examples/protocols/asio/tcp_echo_server/main/CMakeLists.txt +++ b/examples/protocols/asio/tcp_echo_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "echo_server.cpp") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "echo_server.cpp" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/asio/udp_echo_server/main/CMakeLists.txt b/examples/protocols/asio/udp_echo_server/main/CMakeLists.txt index cd24937bef..c7a9e3575a 100644 --- a/examples/protocols/asio/udp_echo_server/main/CMakeLists.txt +++ b/examples/protocols/asio/udp_echo_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "udp_echo_server.cpp") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "udp_echo_server.cpp" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/coap_client/main/CMakeLists.txt b/examples/protocols/coap_client/main/CMakeLists.txt index eb1a1db15d..90a88c9d3b 100644 --- a/examples/protocols/coap_client/main/CMakeLists.txt +++ b/examples/protocols/coap_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "coap_client_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "coap_client_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/coap_server/main/CMakeLists.txt b/examples/protocols/coap_server/main/CMakeLists.txt index 8650fb1147..c28a7be75e 100644 --- a/examples/protocols/coap_server/main/CMakeLists.txt +++ b/examples/protocols/coap_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "coap_server_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "coap_server_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/esp_http_client/main/CMakeLists.txt b/examples/protocols/esp_http_client/main/CMakeLists.txt index 77a52e233a..8cc92e71e8 100644 --- a/examples/protocols/esp_http_client/main/CMakeLists.txt +++ b/examples/protocols/esp_http_client/main/CMakeLists.txt @@ -1,10 +1,6 @@ -set(COMPONENT_SRCS "esp_http_client_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - - # Embed the server root certificate into the final binary # # (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.) -set(COMPONENT_EMBED_TXTFILES howsmyssl_com_root_cert.pem) - -register_component() +idf_component_register(SRCS "esp_http_client_example.c" + INCLUDE_DIRS "." + EMBED_TXTFILES howsmyssl_com_root_cert.pem) \ No newline at end of file diff --git a/examples/protocols/http2_request/components/sh2lib/CMakeLists.txt b/examples/protocols/http2_request/components/sh2lib/CMakeLists.txt index ec1b5a1e12..030f3f14c2 100644 --- a/examples/protocols/http2_request/components/sh2lib/CMakeLists.txt +++ b/examples/protocols/http2_request/components/sh2lib/CMakeLists.txt @@ -1,8 +1,4 @@ -set(COMPONENT_ADD_INCLUDEDIRS .) - -set(COMPONENT_SRCS "sh2lib.c") - -set(COMPONENT_REQUIRES nghttp) -set(COMPONENT_PRIV_REQUIRES lwip esp-tls) - -register_component() +idf_component_register(SRCS "sh2lib.c" + INCLUDE_DIRS . + REQUIRES nghttp + PRIV_REQUIRES lwip esp-tls) diff --git a/examples/protocols/http2_request/main/CMakeLists.txt b/examples/protocols/http2_request/main/CMakeLists.txt index 6139002258..defbb29583 100644 --- a/examples/protocols/http2_request/main/CMakeLists.txt +++ b/examples/protocols/http2_request/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "http2_request_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "http2_request_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/http_request/main/CMakeLists.txt b/examples/protocols/http_request/main/CMakeLists.txt index 8e346e8bb3..b4b91e9b87 100644 --- a/examples/protocols/http_request/main/CMakeLists.txt +++ b/examples/protocols/http_request/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "http_request_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "http_request_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/http_server/advanced_tests/main/CMakeLists.txt b/examples/protocols/http_server/advanced_tests/main/CMakeLists.txt index 9fd69b1d35..53a3e4d8b9 100644 --- a/examples/protocols/http_server/advanced_tests/main/CMakeLists.txt +++ b/examples/protocols/http_server/advanced_tests/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "main.c" - "tests.c") -set(COMPONENT_ADD_INCLUDEDIRS ". include") - -register_component() +idf_component_register(SRCS "main.c" + "tests.c" + INCLUDE_DIRS "." "include") \ No newline at end of file diff --git a/examples/protocols/http_server/file_serving/main/CMakeLists.txt b/examples/protocols/http_server/file_serving/main/CMakeLists.txt index a9493f54a8..2354c4b1be 100644 --- a/examples/protocols/http_server/file_serving/main/CMakeLists.txt +++ b/examples/protocols/http_server/file_serving/main/CMakeLists.txt @@ -1,6 +1,3 @@ -set(COMPONENT_SRCS "main.c" "file_server.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -set(COMPONENT_EMBED_FILES "favicon.ico" "upload_script.html") - -register_component() +idf_component_register(SRCS "main.c" "file_server.c" + INCLUDE_DIRS "." + EMBED_FILES "favicon.ico" "upload_script.html") \ No newline at end of file diff --git a/examples/protocols/http_server/persistent_sockets/main/CMakeLists.txt b/examples/protocols/http_server/persistent_sockets/main/CMakeLists.txt index 85970762ab..e0287b7b9e 100644 --- a/examples/protocols/http_server/persistent_sockets/main/CMakeLists.txt +++ b/examples/protocols/http_server/persistent_sockets/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/http_server/restful_server/main/CMakeLists.txt b/examples/protocols/http_server/restful_server/main/CMakeLists.txt index 6df9c7c4da..4e35a40f23 100644 --- a/examples/protocols/http_server/restful_server/main/CMakeLists.txt +++ b/examples/protocols/http_server/restful_server/main/CMakeLists.txt @@ -1,7 +1,6 @@ -set(COMPONENT_SRCS "esp_rest_main.c" "rest_server.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "esp_rest_main.c" + "rest_server.c" + INCLUDE_DIRS ".") if(CONFIG_EXAMPLE_WEB_DEPLOY_SF) set(WEB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../front/web-demo") diff --git a/examples/protocols/http_server/simple/main/CMakeLists.txt b/examples/protocols/http_server/simple/main/CMakeLists.txt index 85970762ab..e0287b7b9e 100644 --- a/examples/protocols/http_server/simple/main/CMakeLists.txt +++ b/examples/protocols/http_server/simple/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/https_mbedtls/main/CMakeLists.txt b/examples/protocols/https_mbedtls/main/CMakeLists.txt index c9b097c6b9..99d46aba00 100644 --- a/examples/protocols/https_mbedtls/main/CMakeLists.txt +++ b/examples/protocols/https_mbedtls/main/CMakeLists.txt @@ -1,10 +1,6 @@ -set(COMPONENT_SRCS "https_mbedtls_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - - # Embed the server root certificate into the final binary # # (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.) -set(COMPONENT_EMBED_TXTFILES server_root_cert.pem) - -register_component() +idf_component_register(SRCS "https_mbedtls_example_main.c" + INCLUDE_DIRS "." + EMBED_TXTFILES server_root_cert.pem) \ No newline at end of file diff --git a/examples/protocols/https_request/main/CMakeLists.txt b/examples/protocols/https_request/main/CMakeLists.txt index 60a1a0664c..5501a68205 100644 --- a/examples/protocols/https_request/main/CMakeLists.txt +++ b/examples/protocols/https_request/main/CMakeLists.txt @@ -1,10 +1,6 @@ -set(COMPONENT_SRCS "https_request_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - - # Embed the server root certificate into the final binary # # (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.) -set(COMPONENT_EMBED_TXTFILES server_root_cert.pem) - -register_component() +idf_component_register(SRCS "https_request_example_main.c" + INCLUDE_DIRS "." + EMBED_TXTFILES server_root_cert.pem) \ No newline at end of file diff --git a/examples/protocols/https_server/main/CMakeLists.txt b/examples/protocols/https_server/main/CMakeLists.txt index 9e08fb4d71..feca398b8e 100644 --- a/examples/protocols/https_server/main/CMakeLists.txt +++ b/examples/protocols/https_server/main/CMakeLists.txt @@ -1,8 +1,4 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -set(COMPONENT_EMBED_TXTFILES - "certs/cacert.pem" - "certs/prvtkey.pem") - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS "." + EMBED_TXTFILES "certs/cacert.pem" + "certs/prvtkey.pem") \ No newline at end of file diff --git a/examples/protocols/mdns/main/CMakeLists.txt b/examples/protocols/mdns/main/CMakeLists.txt index 814837ea97..141d1e30dc 100644 --- a/examples/protocols/mdns/main/CMakeLists.txt +++ b/examples/protocols/mdns/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "mdns_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "mdns_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/modbus_master/main/CMakeLists.txt b/examples/protocols/modbus_master/main/CMakeLists.txt index 6db1f90987..2555f99e43 100644 --- a/examples/protocols/modbus_master/main/CMakeLists.txt +++ b/examples/protocols/modbus_master/main/CMakeLists.txt @@ -1,6 +1,4 @@ -set(COMPONENT_SRCS "sense_main.c" - "sense_modbus.c" - "device_params.c") -set(COMPONENT_ADD_INCLUDEDIRS "." "include") - -register_component() \ No newline at end of file +idf_component_register(SRCS "sense_main.c" + "sense_modbus.c" + "device_params.c" + INCLUDE_DIRS "." "include") diff --git a/examples/protocols/modbus_slave/main/CMakeLists.txt b/examples/protocols/modbus_slave/main/CMakeLists.txt index 96b08bdc5b..19967e3169 100644 --- a/examples/protocols/modbus_slave/main/CMakeLists.txt +++ b/examples/protocols/modbus_slave/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "freemodbus.c" - "deviceparams.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() \ No newline at end of file +idf_component_register(SRCS "freemodbus.c" + "deviceparams.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/mqtt/publish_test/main/CMakeLists.txt b/examples/protocols/mqtt/publish_test/main/CMakeLists.txt index c3074a7067..67c4c7b5ad 100644 --- a/examples/protocols/mqtt/publish_test/main/CMakeLists.txt +++ b/examples/protocols/mqtt/publish_test/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "publish_test.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "publish_test.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/mqtt/ssl/main/CMakeLists.txt b/examples/protocols/mqtt/ssl/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/protocols/mqtt/ssl/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/mqtt/ssl_mutual_auth/main/CMakeLists.txt b/examples/protocols/mqtt/ssl_mutual_auth/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/protocols/mqtt/ssl_mutual_auth/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl_mutual_auth/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/mqtt/tcp/main/CMakeLists.txt b/examples/protocols/mqtt/tcp/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/protocols/mqtt/tcp/main/CMakeLists.txt +++ b/examples/protocols/mqtt/tcp/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/mqtt/ws/main/CMakeLists.txt b/examples/protocols/mqtt/ws/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/protocols/mqtt/ws/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ws/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/mqtt/wss/main/CMakeLists.txt b/examples/protocols/mqtt/wss/main/CMakeLists.txt index 6b03500639..e7392559ee 100644 --- a/examples/protocols/mqtt/wss/main/CMakeLists.txt +++ b/examples/protocols/mqtt/wss/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/openssl_client/main/CMakeLists.txt b/examples/protocols/openssl_client/main/CMakeLists.txt index d8e15c98cd..c7a8b33d91 100644 --- a/examples/protocols/openssl_client/main/CMakeLists.txt +++ b/examples/protocols/openssl_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "openssl_client_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "openssl_client_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/openssl_server/main/CMakeLists.txt b/examples/protocols/openssl_server/main/CMakeLists.txt index 07b57ef293..713b0cddf2 100644 --- a/examples/protocols/openssl_server/main/CMakeLists.txt +++ b/examples/protocols/openssl_server/main/CMakeLists.txt @@ -1,8 +1,4 @@ -set(COMPONENT_SRCS "openssl_server_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - - # Embed the certificate & key data directly in the built binary -set(COMPONENT_EMBED_TXTFILES cacert.pem prvtkey.pem) - -register_component() +idf_component_register(SRCS "openssl_server_example_main.c" + INCLUDE_DIRS "." + EMBED_TXTFILES cacert.pem prvtkey.pem) \ No newline at end of file diff --git a/examples/protocols/pppos_client/components/modem/CMakeLists.txt b/examples/protocols/pppos_client/components/modem/CMakeLists.txt index 1b1272ec2f..e1bc2c0a97 100644 --- a/examples/protocols/pppos_client/components/modem/CMakeLists.txt +++ b/examples/protocols/pppos_client/components/modem/CMakeLists.txt @@ -1,12 +1,8 @@ -set(COMPONENT_ADD_INCLUDEDIRS .) +set(srcs "src/esp_modem.c" + "src/esp_modem_dce_service" + "src/sim800.c" + "src/bg96.c") -set(COMPONENT_SRCS "src/esp_modem.c" - "src/esp_modem_dce_service" - "src/sim800.c" - "src/bg96.c") - -set(COMPONENT_ADD_INCLUDEDIRS "include") - -set(COMPONENT_REQUIRES driver) - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS include + REQUIRES driver) \ No newline at end of file diff --git a/examples/protocols/pppos_client/main/CMakeLists.txt b/examples/protocols/pppos_client/main/CMakeLists.txt index e4ef1373fa..048a7246cd 100644 --- a/examples/protocols/pppos_client/main/CMakeLists.txt +++ b/examples/protocols/pppos_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "pppos_client_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "pppos_client_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/sntp/main/CMakeLists.txt b/examples/protocols/sntp/main/CMakeLists.txt index c7c035ca03..e06a3359f6 100644 --- a/examples/protocols/sntp/main/CMakeLists.txt +++ b/examples/protocols/sntp/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "sntp_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "sntp_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/sockets/tcp_client/main/CMakeLists.txt b/examples/protocols/sockets/tcp_client/main/CMakeLists.txt index be11f2950f..f1688dcb46 100644 --- a/examples/protocols/sockets/tcp_client/main/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "tcp_client.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "tcp_client.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/sockets/tcp_server/main/CMakeLists.txt b/examples/protocols/sockets/tcp_server/main/CMakeLists.txt index 844a71574c..1565c7bc30 100644 --- a/examples/protocols/sockets/tcp_server/main/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "tcp_server.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "tcp_server.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/sockets/udp_client/main/CMakeLists.txt b/examples/protocols/sockets/udp_client/main/CMakeLists.txt index aadad8c208..adc109a104 100644 --- a/examples/protocols/sockets/udp_client/main/CMakeLists.txt +++ b/examples/protocols/sockets/udp_client/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "udp_client.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "udp_client.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/sockets/udp_multicast/main/CMakeLists.txt b/examples/protocols/sockets/udp_multicast/main/CMakeLists.txt index d3caeb6ed7..a8b478a68f 100644 --- a/examples/protocols/sockets/udp_multicast/main/CMakeLists.txt +++ b/examples/protocols/sockets/udp_multicast/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "udp_multicast_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "udp_multicast_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/sockets/udp_server/main/CMakeLists.txt b/examples/protocols/sockets/udp_server/main/CMakeLists.txt index 55a6bebdc2..ceb9d65fa5 100644 --- a/examples/protocols/sockets/udp_server/main/CMakeLists.txt +++ b/examples/protocols/sockets/udp_server/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "udp_server.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "udp_server.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/websocket/main/CMakeLists.txt b/examples/protocols/websocket/main/CMakeLists.txt index caf642155c..bff26f1088 100644 --- a/examples/protocols/websocket/main/CMakeLists.txt +++ b/examples/protocols/websocket/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "websocket_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "websocket_example.c" + INCLUDE_DIRS ".") diff --git a/examples/provisioning/ble_prov/main/CMakeLists.txt b/examples/provisioning/ble_prov/main/CMakeLists.txt index 3c44a1a36a..a483b3871f 100644 --- a/examples/provisioning/ble_prov/main/CMakeLists.txt +++ b/examples/provisioning/ble_prov/main/CMakeLists.txt @@ -1,6 +1,4 @@ -set(COMPONENT_SRCS "app_main.c" - "app_prov.c" - "app_prov_handlers.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + "app_prov.c" + "app_prov_handlers.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/provisioning/console_prov/main/CMakeLists.txt b/examples/provisioning/console_prov/main/CMakeLists.txt index 3c44a1a36a..a483b3871f 100644 --- a/examples/provisioning/console_prov/main/CMakeLists.txt +++ b/examples/provisioning/console_prov/main/CMakeLists.txt @@ -1,6 +1,4 @@ -set(COMPONENT_SRCS "app_main.c" - "app_prov.c" - "app_prov_handlers.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + "app_prov.c" + "app_prov_handlers.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/provisioning/custom_config/components/custom_provisioning/CMakeLists.txt b/examples/provisioning/custom_config/components/custom_provisioning/CMakeLists.txt index 4e0f61c125..bcffb88bc6 100644 --- a/examples/provisioning/custom_config/components/custom_provisioning/CMakeLists.txt +++ b/examples/provisioning/custom_config/components/custom_provisioning/CMakeLists.txt @@ -1,8 +1,5 @@ -set(COMPONENT_ADD_INCLUDEDIRS include) -set(COMPONENT_PRIV_INCLUDEDIRS proto-c) -set(COMPONENT_SRCS "src/custom_config.c" - "proto-c/custom_config.pb-c.c") - -set(COMPONENT_PRIV_REQUIRES protobuf-c) - -register_component() +idf_component_register(SRCS "src/custom_config.c" + "proto-c/custom_config.pb-c.c" + INCLUDE_DIRS include + PRIV_INCLUDE_DIRS proto-c + PRIV_REQUIRES protobuf-c) \ No newline at end of file diff --git a/examples/provisioning/custom_config/main/CMakeLists.txt b/examples/provisioning/custom_config/main/CMakeLists.txt index 3c44a1a36a..a483b3871f 100644 --- a/examples/provisioning/custom_config/main/CMakeLists.txt +++ b/examples/provisioning/custom_config/main/CMakeLists.txt @@ -1,6 +1,4 @@ -set(COMPONENT_SRCS "app_main.c" - "app_prov.c" - "app_prov_handlers.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + "app_prov.c" + "app_prov_handlers.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/provisioning/manager/main/CMakeLists.txt b/examples/provisioning/manager/main/CMakeLists.txt index 6b03500639..61fac40e63 100644 --- a/examples/provisioning/manager/main/CMakeLists.txt +++ b/examples/provisioning/manager/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + INCLUDE_DIRS ".") diff --git a/examples/provisioning/softap_prov/main/CMakeLists.txt b/examples/provisioning/softap_prov/main/CMakeLists.txt index 3c44a1a36a..a483b3871f 100644 --- a/examples/provisioning/softap_prov/main/CMakeLists.txt +++ b/examples/provisioning/softap_prov/main/CMakeLists.txt @@ -1,6 +1,4 @@ -set(COMPONENT_SRCS "app_main.c" - "app_prov.c" - "app_prov_handlers.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_main.c" + "app_prov.c" + "app_prov_handlers.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/nvs_rw_blob/main/CMakeLists.txt b/examples/storage/nvs_rw_blob/main/CMakeLists.txt index 675c11a0e9..a267ebda53 100644 --- a/examples/storage/nvs_rw_blob/main/CMakeLists.txt +++ b/examples/storage/nvs_rw_blob/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "nvs_blob_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "nvs_blob_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/nvs_rw_value/main/CMakeLists.txt b/examples/storage/nvs_rw_value/main/CMakeLists.txt index 1383460018..6690649ca0 100644 --- a/examples/storage/nvs_rw_value/main/CMakeLists.txt +++ b/examples/storage/nvs_rw_value/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "nvs_value_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "nvs_value_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/partition_api/partition_find/main/CMakeLists.txt b/examples/storage/partition_api/partition_find/main/CMakeLists.txt index 695e65e746..b2d392b5d4 100644 --- a/examples/storage/partition_api/partition_find/main/CMakeLists.txt +++ b/examples/storage/partition_api/partition_find/main/CMakeLists.txt @@ -1,6 +1,3 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -set(COMPONENT_EMBED_TXTFILES ../partitions_example.csv) - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS "." + EMBED_TXTFILES ../partitions_example.csv) \ No newline at end of file diff --git a/examples/storage/partition_api/partition_mmap/main/CMakeLists.txt b/examples/storage/partition_api/partition_mmap/main/CMakeLists.txt index 85970762ab..e0287b7b9e 100644 --- a/examples/storage/partition_api/partition_mmap/main/CMakeLists.txt +++ b/examples/storage/partition_api/partition_mmap/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/partition_api/partition_ops/main/CMakeLists.txt b/examples/storage/partition_api/partition_ops/main/CMakeLists.txt index 85970762ab..e0287b7b9e 100644 --- a/examples/storage/partition_api/partition_ops/main/CMakeLists.txt +++ b/examples/storage/partition_api/partition_ops/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/parttool/main/CMakeLists.txt b/examples/storage/parttool/main/CMakeLists.txt index a574d5ffe6..6056a42f9f 100644 --- a/examples/storage/parttool/main/CMakeLists.txt +++ b/examples/storage/parttool/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "parttool_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() \ No newline at end of file +idf_component_register(SRCS "parttool_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/sd_card/main/CMakeLists.txt b/examples/storage/sd_card/main/CMakeLists.txt index d0a4b53d93..439aa90025 100644 --- a/examples/storage/sd_card/main/CMakeLists.txt +++ b/examples/storage/sd_card/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "sd_card_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "sd_card_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/semihost_vfs/main/CMakeLists.txt b/examples/storage/semihost_vfs/main/CMakeLists.txt index 34d60ad45e..aabc5a454f 100644 --- a/examples/storage/semihost_vfs/main/CMakeLists.txt +++ b/examples/storage/semihost_vfs/main/CMakeLists.txt @@ -1,4 +1,5 @@ -set(COMPONENT_SRCS "semihost_vfs_example_main.c") +set(COMPONENT_SRCS ) set(COMPONENT_ADD_INCLUDEDIRS ".") -register_component() +idf_component_register(SRCS "semihost_vfs_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/spiffs/main/CMakeLists.txt b/examples/storage/spiffs/main/CMakeLists.txt index 8d041d56d1..026db13131 100644 --- a/examples/storage/spiffs/main/CMakeLists.txt +++ b/examples/storage/spiffs/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "spiffs_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "spiffs_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/storage/spiffsgen/main/CMakeLists.txt b/examples/storage/spiffsgen/main/CMakeLists.txt index fdae02e50f..6153893c3c 100644 --- a/examples/storage/spiffsgen/main/CMakeLists.txt +++ b/examples/storage/spiffsgen/main/CMakeLists.txt @@ -1,7 +1,5 @@ -set(COMPONENT_SRCS "spiffsgen_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "spiffsgen_example_main.c" + INCLUDE_DIRS ".") # Create a SPIFFS image from the contents of the 'spiffs_image' directory # that fits the partition named 'storage'. FLASH_IN_PROJECT indicates that diff --git a/examples/storage/wear_levelling/main/CMakeLists.txt b/examples/storage/wear_levelling/main/CMakeLists.txt index e344e9a767..c92569631f 100644 --- a/examples/storage/wear_levelling/main/CMakeLists.txt +++ b/examples/storage/wear_levelling/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "wear_levelling_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "wear_levelling_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/app_trace_to_host/main/CMakeLists.txt b/examples/system/app_trace_to_host/main/CMakeLists.txt index 767689da75..b8adc44f73 100644 --- a/examples/system/app_trace_to_host/main/CMakeLists.txt +++ b/examples/system/app_trace_to_host/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_trace_to_host_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_trace_to_host_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/base_mac_address/main/CMakeLists.txt b/examples/system/base_mac_address/main/CMakeLists.txt index 364317db42..ab68da3e75 100644 --- a/examples/system/base_mac_address/main/CMakeLists.txt +++ b/examples/system/base_mac_address/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "base_mac_address_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "base_mac_address_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/console/components/cmd_nvs/CMakeLists.txt b/examples/system/console/components/cmd_nvs/CMakeLists.txt index 7c2d3c7d04..ab8257f9ca 100644 --- a/examples/system/console/components/cmd_nvs/CMakeLists.txt +++ b/examples/system/console/components/cmd_nvs/CMakeLists.txt @@ -1,7 +1,3 @@ -set(COMPONENT_ADD_INCLUDEDIRS .) - -set(COMPONENT_SRCS "cmd_nvs.c") - -set(COMPONENT_REQUIRES console nvs_flash) - -register_component() +idf_component_register(SRCS "cmd_nvs.c" + INCLUDE_DIRS . + REQUIRES console nvs_flash) \ No newline at end of file diff --git a/examples/system/console/components/cmd_system/CMakeLists.txt b/examples/system/console/components/cmd_system/CMakeLists.txt index b45a40c31b..ff4612b959 100644 --- a/examples/system/console/components/cmd_system/CMakeLists.txt +++ b/examples/system/console/components/cmd_system/CMakeLists.txt @@ -1,7 +1,3 @@ -set(COMPONENT_ADD_INCLUDEDIRS .) - -set(COMPONENT_SRCS "cmd_system.c") - -set(COMPONENT_REQUIRES console spi_flash) - -register_component() +idf_component_register(SRCS "cmd_system.c" + INCLUDE_DIRS . + REQUIRES console spi_flash) \ No newline at end of file diff --git a/examples/system/console/main/CMakeLists.txt b/examples/system/console/main/CMakeLists.txt index b285886390..5afdb190ad 100644 --- a/examples/system/console/main/CMakeLists.txt +++ b/examples/system/console/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "cmd_wifi.c" - "console_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "cmd_wifi.c" + "console_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/cpp_exceptions/main/CMakeLists.txt b/examples/system/cpp_exceptions/main/CMakeLists.txt index f735cc5a64..6668d4f291 100644 --- a/examples/system/cpp_exceptions/main/CMakeLists.txt +++ b/examples/system/cpp_exceptions/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "exception_example_main.cpp") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "exception_example_main.cpp" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/cpp_pthread/main/CMakeLists.txt b/examples/system/cpp_pthread/main/CMakeLists.txt index f95c5997c7..f4c4d218e0 100644 --- a/examples/system/cpp_pthread/main/CMakeLists.txt +++ b/examples/system/cpp_pthread/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "cpp_pthread.cpp") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "cpp_pthread.cpp" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/deep_sleep/main/CMakeLists.txt b/examples/system/deep_sleep/main/CMakeLists.txt index e99ca4de9d..c64fc7ac48 100644 --- a/examples/system/deep_sleep/main/CMakeLists.txt +++ b/examples/system/deep_sleep/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "deep_sleep_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "deep_sleep_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/esp_event/default_event_loop/main/CMakeLists.txt b/examples/system/esp_event/default_event_loop/main/CMakeLists.txt index 85970762ab..e0287b7b9e 100644 --- a/examples/system/esp_event/default_event_loop/main/CMakeLists.txt +++ b/examples/system/esp_event/default_event_loop/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/esp_event/user_event_loops/main/CMakeLists.txt b/examples/system/esp_event/user_event_loops/main/CMakeLists.txt index 85970762ab..e0287b7b9e 100644 --- a/examples/system/esp_event/user_event_loops/main/CMakeLists.txt +++ b/examples/system/esp_event/user_event_loops/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/esp_timer/main/CMakeLists.txt b/examples/system/esp_timer/main/CMakeLists.txt index 09db9ec296..eefc6db70d 100644 --- a/examples/system/esp_timer/main/CMakeLists.txt +++ b/examples/system/esp_timer/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "esp_timer_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "esp_timer_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/freertos/real_time_stats/main/CMakeLists.txt b/examples/system/freertos/real_time_stats/main/CMakeLists.txt index 85970762ab..e0287b7b9e 100644 --- a/examples/system/freertos/real_time_stats/main/CMakeLists.txt +++ b/examples/system/freertos/real_time_stats/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/gcov/main/CMakeLists.txt b/examples/system/gcov/main/CMakeLists.txt index 8c9cbd3eaf..0da58c5e1e 100644 --- a/examples/system/gcov/main/CMakeLists.txt +++ b/examples/system/gcov/main/CMakeLists.txt @@ -1,8 +1,6 @@ -set(COMPONENT_SRCS "gcov_example.c" - "gcov_example_func.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "gcov_example.c" + "gcov_example_func.c" + INCLUDE_DIRS ".") set_source_files_properties(gcov_example.c PROPERTIES COMPILE_FLAGS diff --git a/examples/system/himem/main/CMakeLists.txt b/examples/system/himem/main/CMakeLists.txt index a875dec50c..780e49a35c 100644 --- a/examples/system/himem/main/CMakeLists.txt +++ b/examples/system/himem/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "himem_test_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "himem_test_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/light_sleep/main/CMakeLists.txt b/examples/system/light_sleep/main/CMakeLists.txt index fc813fb9ea..36b6c93cc1 100644 --- a/examples/system/light_sleep/main/CMakeLists.txt +++ b/examples/system/light_sleep/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "light_sleep_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "light_sleep_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/network_tests/main/CMakeLists.txt b/examples/system/network_tests/main/CMakeLists.txt index c16f42adb9..f379bf03a2 100644 --- a/examples/system/network_tests/main/CMakeLists.txt +++ b/examples/system/network_tests/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "net_suite.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "net_suite.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/ota/advanced_https_ota/main/CMakeLists.txt b/examples/system/ota/advanced_https_ota/main/CMakeLists.txt index 19abec788c..f24c785feb 100644 --- a/examples/system/ota/advanced_https_ota/main/CMakeLists.txt +++ b/examples/system/ota/advanced_https_ota/main/CMakeLists.txt @@ -1,9 +1,4 @@ -set(COMPONENT_SRCS "advanced_https_ota_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - - -# Embed the server root certificate into the final binary -idf_build_get_property(project_dir PROJECT_DIR) -set(COMPONENT_EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) - -register_component() +idf_component_register(SRCS "advanced_https_ota_example.c" + INCLUDE_DIRS "." + # Embed the server root certificate into the final binary + EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) diff --git a/examples/system/ota/native_ota_example/main/CMakeLists.txt b/examples/system/ota/native_ota_example/main/CMakeLists.txt index 1e5d1ed0f5..c09881022c 100644 --- a/examples/system/ota/native_ota_example/main/CMakeLists.txt +++ b/examples/system/ota/native_ota_example/main/CMakeLists.txt @@ -1,8 +1,5 @@ -set(COMPONENT_SRCS "native_ota_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - # Embed the server root certificate into the final binary idf_build_get_property(project_dir PROJECT_DIR) -set(COMPONENT_EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) - -register_component() +idf_component_register(SRCS "native_ota_example.c" + INCLUDE_DIRS "." + EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) \ No newline at end of file diff --git a/examples/system/ota/otatool/main/CMakeLists.txt b/examples/system/ota/otatool/main/CMakeLists.txt index 2dc1cb53a0..4c341608ea 100644 --- a/examples/system/ota/otatool/main/CMakeLists.txt +++ b/examples/system/ota/otatool/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "otatool_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "otatool_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/ota/simple_ota_example/main/CMakeLists.txt b/examples/system/ota/simple_ota_example/main/CMakeLists.txt index c5db485eff..f8c5c183cf 100644 --- a/examples/system/ota/simple_ota_example/main/CMakeLists.txt +++ b/examples/system/ota/simple_ota_example/main/CMakeLists.txt @@ -1,9 +1,5 @@ -set(COMPONENT_SRCS "simple_ota_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - - # Embed the server root certificate into the final binary idf_build_get_property(project_dir PROJECT_DIR) -set(COMPONENT_EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) - -register_component() +idf_component_register(SRCS "simple_ota_example.c" + INCLUDE_DIRS "." + EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) diff --git a/examples/system/select/main/CMakeLists.txt b/examples/system/select/main/CMakeLists.txt index bf59f84c44..3dd427e874 100644 --- a/examples/system/select/main/CMakeLists.txt +++ b/examples/system/select/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "select_example.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "select_example.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/sysview_tracing/main/CMakeLists.txt b/examples/system/sysview_tracing/main/CMakeLists.txt index dfee658c9a..a23c5937bc 100644 --- a/examples/system/sysview_tracing/main/CMakeLists.txt +++ b/examples/system/sysview_tracing/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "sysview_tracing.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "sysview_tracing.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/sysview_tracing_heap_log/main/CMakeLists.txt b/examples/system/sysview_tracing_heap_log/main/CMakeLists.txt index 58d592c8b2..689bafd3ba 100644 --- a/examples/system/sysview_tracing_heap_log/main/CMakeLists.txt +++ b/examples/system/sysview_tracing_heap_log/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "sysview_heap_log.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "sysview_heap_log.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/task_watchdog/main/CMakeLists.txt b/examples/system/task_watchdog/main/CMakeLists.txt index ef06f3cc55..e805c40ac1 100644 --- a/examples/system/task_watchdog/main/CMakeLists.txt +++ b/examples/system/task_watchdog/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "task_watchdog_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "task_watchdog_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/ulp/main/CMakeLists.txt b/examples/system/ulp/main/CMakeLists.txt index d426857dc6..af7cb3f765 100644 --- a/examples/system/ulp/main/CMakeLists.txt +++ b/examples/system/ulp/main/CMakeLists.txt @@ -1,10 +1,6 @@ -# Set usual component variables -set(COMPONENT_SRCS "ulp_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS "") -set(COMPONENT_REQUIRES soc nvs_flash ulp) - -register_component() - +idf_component_register(SRCS "ulp_example_main.c" + INCLUDE_DIRS "" + REQUIRES soc nvs_flash ulp) # # ULP support additions to component CMakeLists.txt. # diff --git a/examples/system/ulp_adc/main/CMakeLists.txt b/examples/system/ulp_adc/main/CMakeLists.txt index 5f64763179..ef85f9b2fd 100644 --- a/examples/system/ulp_adc/main/CMakeLists.txt +++ b/examples/system/ulp_adc/main/CMakeLists.txt @@ -1,10 +1,6 @@ -# Set usual component variables -set(COMPONENT_SRCS "ulp_adc_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS "") -set(COMPONENT_REQUIRES soc nvs_flash ulp driver) - -register_component() - +idf_component_register(SRCS "ulp_adc_example_main.c" + INCLUDE_DIRS "" + REQUIRES soc nvs_flash ulp driver) # # ULP support additions to component CMakeLists.txt. # @@ -22,4 +18,4 @@ set(ulp_exp_dep_srcs "ulp_adc_example_main.c") # # 4. Call function to build ULP binary and embed in project using the argument # values above. -ulp_embed_binary(${ulp_app_name} ${ulp_s_sources} ${ulp_exp_dep_srcs}) \ No newline at end of file +ulp_embed_binary(${ulp_app_name} ${ulp_s_sources} ${ulp_exp_dep_srcs}) diff --git a/examples/system/unit_test/components/testable/CMakeLists.txt b/examples/system/unit_test/components/testable/CMakeLists.txt index 1df93d6d88..59adfac9d6 100644 --- a/examples/system/unit_test/components/testable/CMakeLists.txt +++ b/examples/system/unit_test/components/testable/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "mean.c") -set(COMPONENT_ADD_INCLUDEDIRS "include") - -register_component() +idf_component_register(SRCS "mean.c" + INCLUDE_DIRS "include") \ No newline at end of file diff --git a/examples/system/unit_test/components/testable/test/CMakeLists.txt b/examples/system/unit_test/components/testable/test/CMakeLists.txt index bbb5b276da..33dded71ae 100644 --- a/examples/system/unit_test/components/testable/test/CMakeLists.txt +++ b/examples/system/unit_test/components/testable/test/CMakeLists.txt @@ -1,6 +1,3 @@ -set(COMPONENT_SRCDIRS ".") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -set(COMPONENT_REQUIRES unity testable) - -register_component() +idf_component_register(SRC_DIRS "." + INCLUDE_DIRS "." + REQUIRES unity testable) \ No newline at end of file diff --git a/examples/system/unit_test/main/CMakeLists.txt b/examples/system/unit_test/main/CMakeLists.txt index f726378150..0631174b7c 100644 --- a/examples/system/unit_test/main/CMakeLists.txt +++ b/examples/system/unit_test/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "example_unit_test_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_unit_test_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/unit_test/test/main/CMakeLists.txt b/examples/system/unit_test/test/main/CMakeLists.txt index b849174c77..8a4d168eac 100644 --- a/examples/system/unit_test/test/main/CMakeLists.txt +++ b/examples/system/unit_test/test/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "example_unit_test_test.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "example_unit_test_test.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/espnow/main/CMakeLists.txt b/examples/wifi/espnow/main/CMakeLists.txt index 151eab724b..c752a271b6 100644 --- a/examples/wifi/espnow/main/CMakeLists.txt +++ b/examples/wifi/espnow/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "espnow_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "espnow_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/getting_started/softAP/main/CMakeLists.txt b/examples/wifi/getting_started/softAP/main/CMakeLists.txt index 6724060715..a89388299c 100644 --- a/examples/wifi/getting_started/softAP/main/CMakeLists.txt +++ b/examples/wifi/getting_started/softAP/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "softap_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "softap_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/getting_started/station/main/CMakeLists.txt b/examples/wifi/getting_started/station/main/CMakeLists.txt index 3cd1031283..444b0f59f1 100644 --- a/examples/wifi/getting_started/station/main/CMakeLists.txt +++ b/examples/wifi/getting_started/station/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "station_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "station_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/iperf/components/iperf/CMakeLists.txt b/examples/wifi/iperf/components/iperf/CMakeLists.txt index 11a8f571e2..29cca1e3ec 100644 --- a/examples/wifi/iperf/components/iperf/CMakeLists.txt +++ b/examples/wifi/iperf/components/iperf/CMakeLists.txt @@ -1,7 +1,3 @@ -set(COMPONENT_ADD_INCLUDEDIRS .) - -set(COMPONENT_SRCS "iperf.c") - -set(COMPONENT_REQUIRES lwip) - -register_component() +idf_component_register(SRCS "iperf.c" + INCLUDE_DIRS . + REQUIRES lwip) \ No newline at end of file diff --git a/examples/wifi/iperf/main/CMakeLists.txt b/examples/wifi/iperf/main/CMakeLists.txt index e94ff94b07..978cc99e0e 100644 --- a/examples/wifi/iperf/main/CMakeLists.txt +++ b/examples/wifi/iperf/main/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCS "cmd_wifi.c" - "iperf_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "cmd_wifi.c" + "iperf_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/power_save/main/CMakeLists.txt b/examples/wifi/power_save/main/CMakeLists.txt index f7fc34d94a..e02dc88c90 100644 --- a/examples/wifi/power_save/main/CMakeLists.txt +++ b/examples/wifi/power_save/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "power_save.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "power_save.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/scan/main/CMakeLists.txt b/examples/wifi/scan/main/CMakeLists.txt index 0b789863af..9719433b43 100644 --- a/examples/wifi/scan/main/CMakeLists.txt +++ b/examples/wifi/scan/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "scan.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "scan.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/simple_sniffer/components/pcap/CMakeLists.txt b/examples/wifi/simple_sniffer/components/pcap/CMakeLists.txt index 15f5b5da63..ca59591e53 100644 --- a/examples/wifi/simple_sniffer/components/pcap/CMakeLists.txt +++ b/examples/wifi/simple_sniffer/components/pcap/CMakeLists.txt @@ -1,5 +1,2 @@ -set(COMPONENT_ADD_INCLUDEDIRS .) - -set(COMPONENT_SRCS "pcap.c") - -register_component() +idf_component_register(SRCS "pcap.c" + INCLUDE_DIRS .) \ No newline at end of file diff --git a/examples/wifi/simple_sniffer/main/CMakeLists.txt b/examples/wifi/simple_sniffer/main/CMakeLists.txt index 8e95d42fc3..9e14ddef0d 100644 --- a/examples/wifi/simple_sniffer/main/CMakeLists.txt +++ b/examples/wifi/simple_sniffer/main/CMakeLists.txt @@ -1,10 +1,3 @@ - -# 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(COMPONENT_SRCS "simple_sniffer_example_main.c" - "cmd_sniffer.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "simple_sniffer_example_main.c" + "cmd_sniffer.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/smart_config/main/CMakeLists.txt b/examples/wifi/smart_config/main/CMakeLists.txt index a716681e47..5f956d6660 100644 --- a/examples/wifi/smart_config/main/CMakeLists.txt +++ b/examples/wifi/smart_config/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "smartconfig_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "smartconfig_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/wifi/wpa2_enterprise/main/CMakeLists.txt b/examples/wifi/wpa2_enterprise/main/CMakeLists.txt index 10640a32db..1c847a1f62 100644 --- a/examples/wifi/wpa2_enterprise/main/CMakeLists.txt +++ b/examples/wifi/wpa2_enterprise/main/CMakeLists.txt @@ -1,8 +1,4 @@ -set(COMPONENT_SRCS "wpa2_enterprise_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - - # Embed CA, certificate & key directly into binary -set(COMPONENT_EMBED_TXTFILES wpa2_ca.pem wpa2_client.crt wpa2_client.key) - -register_component() +idf_component_register(SRCS "wpa2_enterprise_main.c" + INCLUDE_DIRS "." + EMBED_TXTFILES wpa2_ca.pem wpa2_client.crt wpa2_client.key) \ No newline at end of file diff --git a/examples/wifi/wps/main/CMakeLists.txt b/examples/wifi/wps/main/CMakeLists.txt index c0a1063f66..5ca4a9211f 100644 --- a/examples/wifi/wps/main/CMakeLists.txt +++ b/examples/wifi/wps/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "wps.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "wps.c" + INCLUDE_DIRS ".") \ No newline at end of file