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 723199ce0..f366a278d 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 a3ff3757c..cf98dd813 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 a55538b5f..55f2d445a 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 a55538b5f..d1d916efb 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 98b05a101..d0a3885dd 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 d005e6012..494d32308 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 3435b4c56..99553fec3 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 66a4e1aa6..cdd852c57 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 6445d3c5e..efba49f6b 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 1ae1a02e6..50293e2a7 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 de584f397..1b83a293f 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 99f35ee07..be4f67ba8 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 1fe275526..e4c37ee28 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 3c1f62ac8..c54e45c92 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 cbb9b24c3..8e40bfbf2 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 68ddbfb4c..4bc23a96f 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 0694503f9..a71f85ba7 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 1eae1b74c..09a976ad1 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 b224db80b..369e404a1 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 f3b911135..03781e478 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 2f40a64c6..b4eacc768 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 7c79edcea..82a30b2f7 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 32cea7e2e..691e1edd2 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 87df03c69..651459111 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 d23e5ffc7..e950c9ecd 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 7588b5a7a..fbe553576 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 19dcf60d3..826febe74 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 fb136b8b9..6c60c8f98 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 784909da0..0ccb219b4 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 aaf55bea5..5dbbb14c2 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 8c0c9fa0f..8bc01f1bb 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 16ecc3272..aa6603090 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 69f12a384..413c3b514 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 b79b83195..c299e0378 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 451eeceed..686ab05ac 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 1ae57b28a..686ab05ac 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 9b5d48fc6..035e5bd27 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 1d7776ecf..5a6c87d57 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 cf9bf40a9..ab23bf60f 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 5eab299b0..191642e1d 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 f0dc1d6a7..31a67ddcb 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 4a002fbfc..5ade11d5b 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 21db765a8..5c3f85e0a 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 d768cb825..d33d5e171 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 02386f719..4dc828aac 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 50cdc0982..fed3a9443 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 dbb7b172a..5233689fb 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 6b0350063..e7392559e 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 6405eb95f..f6064011c 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 d5fdbf560..ec236fe84 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 a52ad9451..3f7cedf8d 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 1259035cb..81ecd07a8 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 c8fa3d96b..7a6efda90 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 2bd277955..11ace9793 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 80c75b228..907a16c05 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 a0a9147a2..ad4821402 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 1cda8805c..9f5c38bba 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 6b0350063..e7392559e 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 6b0350063..e7392559e 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 1b0f2299f..52abe2822 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 806ccae2b..6d1a795b4 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 6b0350063..e7392559e 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 6b0350063..e7392559e 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 9a96ce906..9a07f9eb7 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 b77bf9c7b..df4240c34 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 b556e8c0e..dad0c4905 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 a8c42b8a7..b06050f46 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 b57232352..7cfd9876e 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 1ca803f13..b3eac5eff 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 8b3393049..ef96bc63f 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 5a408ef1e..44d883850 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 4e3ae00de..8f1897f23 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 25419de4a..d92c9a8ae 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 7e44a9039..9042b223a 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 04c3c94d9..ef518dc72 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 cd24937be..c7a9e3575 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 eb1a1db15..90a88c9d3 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 8650fb114..c28a7be75 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 77a52e233..8cc92e71e 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 ec1b5a1e1..030f3f14c 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 613900225..defbb2958 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 8e346e8bb..b4b91e9b8 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 9fd69b1d3..53a3e4d8b 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 a9493f54a..2354c4b1b 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 85970762a..e0287b7b9 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 6df9c7c4d..4e35a40f2 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 85970762a..e0287b7b9 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 c9b097c6b..99d46aba0 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 60a1a0664..5501a6820 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 9e08fb4d7..feca398b8 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 814837ea9..141d1e30d 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 6db1f9098..2555f99e4 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 96b08bdc5..19967e316 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 c3074a706..67c4c7b5a 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 6b0350063..e7392559e 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 6b0350063..e7392559e 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 6b0350063..e7392559e 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 6b0350063..e7392559e 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 6b0350063..e7392559e 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 d8e15c98c..c7a8b33d9 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 07b57ef29..713b0cddf 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 1b1272ec2..e1bc2c0a9 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 e4ef1373f..048a7246c 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 c7c035ca0..e06a3359f 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 be11f2950..f1688dcb4 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 844a71574..1565c7bc3 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 aadad8c20..adc109a10 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 d3caeb6ed..a8b478a68 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 55a6bebdc..ceb9d65fa 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 caf642155..bff26f108 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 3c44a1a36..a483b3871 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 3c44a1a36..a483b3871 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 4e0f61c12..bcffb88bc 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 3c44a1a36..a483b3871 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 6b0350063..61fac40e6 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 3c44a1a36..a483b3871 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 675c11a0e..a267ebda5 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 138346001..6690649ca 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 695e65e74..b2d392b5d 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 85970762a..e0287b7b9 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 85970762a..e0287b7b9 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 a574d5ffe..6056a42f9 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 d0a4b53d9..439aa9002 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 34d60ad45..aabc5a454 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 8d041d56d..026db1313 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 fdae02e50..6153893c3 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 e344e9a76..c92569631 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 767689da7..b8adc44f7 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 364317db4..ab68da3e7 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 7c2d3c7d0..ab8257f9c 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 b45a40c31..ff4612b95 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 b28588639..5afdb190a 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 f735cc5a6..6668d4f29 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 f95c5997c..f4c4d218e 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 e99ca4de9..c64fc7ac4 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 85970762a..e0287b7b9 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 85970762a..e0287b7b9 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 09db9ec29..eefc6db70 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 85970762a..e0287b7b9 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 8c9cbd3ea..0da58c5e1 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 a875dec50..780e49a35 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 fc813fb9e..36b6c93cc 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 c16f42adb..f379bf03a 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 19abec788..f24c785fe 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 1e5d1ed0f..c09881022 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 2dc1cb53a..4c341608e 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 c5db485ef..f8c5c183c 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 bf59f84c4..3dd427e87 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 dfee658c9..a23c5937b 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 58d592c8b..689bafd3b 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 ef06f3cc5..e805c40ac 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 d426857dc..af7cb3f76 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 5f6476317..ef85f9b2f 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 1df93d6d8..59adfac9d 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 bbb5b276d..33dded71a 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 f72637815..0631174b7 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 b849174c7..8a4d168ea 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 151eab724..c752a271b 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 672406071..a89388299 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 3cd103128..444b0f59f 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 11a8f571e..29cca1e3e 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 e94ff94b0..978cc99e0 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 f7fc34d94..e02dc88c9 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 0b789863a..9719433b4 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 15f5b5da6..ca59591e5 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 8e95d42fc..9e14ddef0 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 a716681e4..5f956d666 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 10640a32d..1c847a1f6 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 c0a1063f6..5ca4a9211 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