From 4d9c573fb68b3d3b9e6b88a1a41c44fc85ed434b Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Sun, 22 Mar 2020 17:34:18 +0800 Subject: [PATCH] test, examples: use new component registration function --- components/esp_netif/test/CMakeLists.txt | 8 ++--- components/perfmon/test/CMakeLists.txt | 10 ++----- components/tcp_transport/test/CMakeLists.txt | 8 ++--- .../ble/ble_ancs/main/CMakeLists.txt | 7 ++--- .../coex/gattc_gatts_coex/main/CMakeLists.txt | 6 ++-- .../components/case/CMakeLists.txt | 11 ++++--- .../ble_mesh_coex_test/main/CMakeLists.txt | 9 ++---- .../ble_mesh_node/main/CMakeLists.txt | 23 +++++++-------- .../ble_mesh_provisioner/main/CMakeLists.txt | 29 +++++++++---------- .../main/CMakeLists.txt | 9 ++---- .../main/CMakeLists.txt | 11 ++++--- .../components/button/CMakeLists.txt | 9 ++---- .../onoff_client/main/CMakeLists.txt | 11 ++++--- .../onoff_server/main/CMakeLists.txt | 11 ++++--- .../ble_mesh_provisioner/main/CMakeLists.txt | 9 +++--- .../components/button/CMakeLists.txt | 8 ++--- .../vendor_client/main/CMakeLists.txt | 11 ++++--- .../vendor_server/main/CMakeLists.txt | 11 ++++--- .../components/iperf/CMakeLists.txt | 11 ++----- .../ble_mesh_wifi_coexist/main/CMakeLists.txt | 11 ++++--- .../components/CMakeLists.txt | 14 ++++----- .../main/CMakeLists.txt | 4 +-- .../nimble/blecent/main/CMakeLists.txt | 8 ++--- .../nimble/blehr/main/CMakeLists.txt | 7 ++--- .../nimble/blemesh/main/CMakeLists.txt | 6 ++-- .../nimble/bleprph/main/CMakeLists.txt | 12 ++++---- .../temp_sensor_esp32s2/main/CMakeLists.txt | 6 ++-- .../esp_local_ctrl/main/CMakeLists.txt | 11 ++----- .../https_x509_bundle/main/CMakeLists.txt | 6 ++-- .../mqtt/ssl_psk/main/CMakeLists.txt | 6 ++-- .../flash_encryption/main/CMakeLists.txt | 6 ++-- examples/system/perfmon/main/CMakeLists.txt | 6 ++-- .../security/secure_boot/main/CMakeLists.txt | 6 ++-- 33 files changed, 124 insertions(+), 197 deletions(-) diff --git a/components/esp_netif/test/CMakeLists.txt b/components/esp_netif/test/CMakeLists.txt index 513d8ad984..3601d18984 100644 --- a/components/esp_netif/test/CMakeLists.txt +++ b/components/esp_netif/test/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCDIRS ".") -set(COMPONENT_PRIV_INCLUDEDIRS "../private_include" ".") -set(COMPONENT_PRIV_REQUIRES unity test_utils esp_netif nvs_flash) - -register_component() \ No newline at end of file +idf_component_register(SRC_DIRS "." + INCLUDE_DIRS "../private_include" "." + PRIV_REQUIRES unity test_utils esp_netif nvs_flash) \ No newline at end of file diff --git a/components/perfmon/test/CMakeLists.txt b/components/perfmon/test/CMakeLists.txt index 18634e3452..c2b87155cb 100644 --- a/components/perfmon/test/CMakeLists.txt +++ b/components/perfmon/test/CMakeLists.txt @@ -1,7 +1,3 @@ -set(COMPONENT_SRCDIRS - "." -) -set(COMPONENT_ADD_INCLUDEDIRS ".") -set(COMPONENT_REQUIRES unity xtensa perfmon) - -register_component() +idf_component_register(SRC_DIRS "." + INCLUDE_DIRS "." + PRIV_REQUIRES unity xtensa perfmon) diff --git a/components/tcp_transport/test/CMakeLists.txt b/components/tcp_transport/test/CMakeLists.txt index 88504a27f6..0d1ac818c9 100644 --- a/components/tcp_transport/test/CMakeLists.txt +++ b/components/tcp_transport/test/CMakeLists.txt @@ -1,5 +1,3 @@ -set(COMPONENT_SRCDIRS ".") -set(COMPONENT_PRIV_INCLUDEDIRS "../private_include" ".") -set(COMPONENT_PRIV_REQUIRES unity test_utils tcp_transport) - -register_component() \ No newline at end of file +idf_component_register(SRC_DIRS "." + INCLUDE_DIRS "../private_include" "." + PRIV_REQUIRES unity test_utils tcp_transport) \ No newline at end of file diff --git a/examples/bluetooth/bluedroid/ble/ble_ancs/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_ancs/main/CMakeLists.txt index 7e64fd8041..460583de9a 100644 --- a/examples/bluetooth/bluedroid/ble/ble_ancs/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_ancs/main/CMakeLists.txt @@ -1,5 +1,2 @@ -set(COMPONENT_SRCS "ble_ancs_demo.c" - "ble_ancs.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "ble_ancs_demo.c" "ble_ancs.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/CMakeLists.txt b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/CMakeLists.txt index a3c8592c8d..f0c3ba9036 100644 --- a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "gattc_gatts_coex.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "gattc_gatts_coex.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/components/case/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/components/case/CMakeLists.txt index 97d2da4f84..b08fff2317 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/components/case/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/components/case/CMakeLists.txt @@ -1,12 +1,11 @@ -set(COMPONENT_SRCS "ble_unit.c" +set(srcs "ble_unit.c" "run_tc.c" "sync.c" "test_env.c" "wifi_connect.c" "wifi_unit.c") -set(COMPONENT_ADD_INCLUDEDIRS .) - -set(COMPONENT_REQUIRES console nvs_flash bt) -set(SUPPORTED_TARGETS esp32) -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS "." + REQUIRES console nvs_flash bt + REQUIRED_IDF_TARGETS esp32) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/main/CMakeLists.txt index 44548e75f2..cf4489a446 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/main/CMakeLists.txt @@ -1,6 +1,3 @@ -set(COMPONENT_SRCS "main.c" - "coex_cmd.c") - -set(COMPONENT_ADD_INCLUDEDIRS ".") -set(SUPPORTED_TARGETS esp32) -register_component() +idf_component_register(SRCS "main.c" "coex_cmd.c" + INCLUDE_DIRS "." + REQUIRED_IDF_TARGETS esp32) \ No newline at end of file diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/CMakeLists.txt index 40921b35e8..19c755f834 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/CMakeLists.txt @@ -1,13 +1,12 @@ -set(COMPONENT_SRCS "ble_mesh_adapter.c" - "ble_mesh_cfg_srv_model.c" - "ble_mesh_console_lib.c" - "ble_mesh_console_main.c" - "ble_mesh_console_system.c" - "ble_mesh_register_node_cmd.c" - "ble_mesh_register_server_cmd.c" - "ble_mesh_reg_gen_onoff_client_cmd.c" - "register_bluetooth.c") +set(srcs "ble_mesh_adapter.c" + "ble_mesh_cfg_srv_model.c" + "ble_mesh_console_lib.c" + "ble_mesh_console_main.c" + "ble_mesh_console_system.c" + "ble_mesh_register_node_cmd.c" + "ble_mesh_register_server_cmd.c" + "ble_mesh_reg_gen_onoff_client_cmd.c" + "register_bluetooth.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/CMakeLists.txt index de1c6b9ddb..2d387a0916 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/CMakeLists.txt @@ -1,16 +1,15 @@ -set(COMPONENT_SRCS "ble_mesh_adapter.c" - "transaction.c" - "ble_mesh_cfg_srv_model.c" - "ble_mesh_console_lib.c" - "ble_mesh_console_main.c" - "ble_mesh_console_system.c" - "ble_mesh_reg_cfg_client_cmd.c" - "ble_mesh_reg_gen_onoff_client_cmd.c" - "ble_mesh_reg_test_perf_client_cmd.c" - "ble_mesh_register_node_cmd.c" - "ble_mesh_register_provisioner_cmd.c" - "register_bluetooth.c") +set(srcs "ble_mesh_adapter.c" + "transaction.c" + "ble_mesh_cfg_srv_model.c" + "ble_mesh_console_lib.c" + "ble_mesh_console_main.c" + "ble_mesh_console_system.c" + "ble_mesh_reg_cfg_client_cmd.c" + "ble_mesh_reg_gen_onoff_client_cmd.c" + "ble_mesh_reg_test_perf_client_cmd.c" + "ble_mesh_register_node_cmd.c" + "ble_mesh_register_provisioner_cmd.c" + "register_bluetooth.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/CMakeLists.txt index 6644ba29cd..fb78c876c7 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/main/CMakeLists.txt @@ -1,6 +1,3 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c") - -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "ble_mesh_demo_main.c" + "ble_mesh_demo_init.c" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/CMakeLists.txt index dc91641afd..9ac8fb0419 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/main/CMakeLists.txt @@ -1,7 +1,6 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c" - "board.c") +set(srcs "ble_mesh_demo_main.c" + "ble_mesh_demo_init.c" + "board.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/CMakeLists.txt index 6c385ee217..73d8490240 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/CMakeLists.txt @@ -1,7 +1,2 @@ - -set(COMPONENT_SRCS "button.c" - "button_obj.cpp") - -set(COMPONENT_ADD_INCLUDEDIRS ". include") - -register_component() +idf_component_register(SRCS "button.c" "button_obj.cpp" + INCLUDE_DIRS "." "include") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/CMakeLists.txt index dc91641afd..9ac8fb0419 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/CMakeLists.txt @@ -1,7 +1,6 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c" - "board.c") +set(srcs "ble_mesh_demo_main.c" + "ble_mesh_demo_init.c" + "board.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/CMakeLists.txt index dc91641afd..f5d43fbda7 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/CMakeLists.txt @@ -1,7 +1,6 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c" - "board.c") +set(srcs "ble_mesh_demo_main.c" + "ble_mesh_demo_init.c" + "board.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_provisioner/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_provisioner/main/CMakeLists.txt index 6644ba29cd..2189d1388e 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_provisioner/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_provisioner/main/CMakeLists.txt @@ -1,6 +1,5 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c") +set(srcs "ble_mesh_demo_main.c" + "ble_mesh_demo_init.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/CMakeLists.txt index 6c385ee217..13d6b0843c 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/CMakeLists.txt @@ -1,7 +1,3 @@ -set(COMPONENT_SRCS "button.c" - "button_obj.cpp") - -set(COMPONENT_ADD_INCLUDEDIRS ". include") - -register_component() +idf_component_register(SRCS "button.c" "button_obj.cpp" + INCLUDE_DIRS "." "include") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/main/CMakeLists.txt index dc91641afd..9ac8fb0419 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/main/CMakeLists.txt @@ -1,7 +1,6 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c" - "board.c") +set(srcs "ble_mesh_demo_main.c" + "ble_mesh_demo_init.c" + "board.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/CMakeLists.txt index dc91641afd..9ac8fb0419 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/CMakeLists.txt @@ -1,7 +1,6 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c" - "board.c") +set(srcs "ble_mesh_demo_main.c" + "ble_mesh_demo_init.c" + "board.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/CMakeLists.txt index 5073db6d0f..aa6b0e7824 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/CMakeLists.txt @@ -1,8 +1,3 @@ -set(COMPONENT_SRCS "cmd_wifi.c" - "iperf.c") - -set(COMPONENT_ADD_INCLUDEDIRS .) - -set(COMPONENT_REQUIRES lwip console) - -register_component() +idf_component_register(SRCS "cmd_wifi.c" "iperf.c" + INCLUDE_DIRS "." + REQUIRES lwip console) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/CMakeLists.txt index dc91641afd..9ac8fb0419 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/CMakeLists.txt @@ -1,7 +1,6 @@ -set(COMPONENT_SRCS "ble_mesh_demo_main.c" - "ble_mesh_demo_init.c" - "board.c") +set(srcs "ble_mesh_demo_main.c" + "ble_mesh_demo_init.c" + "board.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/CMakeLists.txt index 44699eb00e..7a0082a2ea 100644 --- a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/CMakeLists.txt @@ -1,9 +1,7 @@ -set(COMPONENT_SRCS "esp_fast_prov_client_model.c" - "esp_fast_prov_server_model.c" - "esp_fast_prov_operation.c") +set(srcs "esp_fast_prov_client_model.c" + "esp_fast_prov_server_model.c" + "esp_fast_prov_operation.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -set(COMPONENT_REQUIRES bt) - -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS "." + REQUIRES bt) diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/CMakeLists.txt index f475ba4612..34613e8e3c 100644 --- a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/CMakeLists.txt @@ -1,3 +1 @@ -set(COMPONENT_SRCS "main.c") - -register_component() +idf_component_register(SRCS "main.c") diff --git a/examples/bluetooth/nimble/blecent/main/CMakeLists.txt b/examples/bluetooth/nimble/blecent/main/CMakeLists.txt index 7ad90092b4..7eff1870a2 100644 --- a/examples/bluetooth/nimble/blecent/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/blecent/main/CMakeLists.txt @@ -1,6 +1,2 @@ -set(COMPONENT_SRCS "main.c" - "misc.c" - "peer.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" "misc.c" "peer.c" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/blehr/main/CMakeLists.txt b/examples/bluetooth/nimble/blehr/main/CMakeLists.txt index 9c74274ab1..e8a76d0b09 100644 --- a/examples/bluetooth/nimble/blehr/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/blehr/main/CMakeLists.txt @@ -1,5 +1,2 @@ -set(COMPONENT_SRCS "main.c" - "gatt_svr.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "main.c" "gatt_svr.c" + INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/blemesh/main/CMakeLists.txt b/examples/bluetooth/nimble/blemesh/main/CMakeLists.txt index aea89ef0e6..94176cab6d 100644 --- a/examples/bluetooth/nimble/blemesh/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/blemesh/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "app_mesh.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "app_mesh.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/bluetooth/nimble/bleprph/main/CMakeLists.txt b/examples/bluetooth/nimble/bleprph/main/CMakeLists.txt index f57d248b33..e634d91537 100644 --- a/examples/bluetooth/nimble/bleprph/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/bleprph/main/CMakeLists.txt @@ -1,7 +1,7 @@ -set(COMPONENT_SRCS "main.c" - "gatt_svr.c" - "misc.c" - "scli.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") +set(srcs "main.c" + "gatt_svr.c" + "misc.c" + "scli.c") -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ".") diff --git a/examples/peripherals/temp_sensor_esp32s2/main/CMakeLists.txt b/examples/peripherals/temp_sensor_esp32s2/main/CMakeLists.txt index 91425ac9f4..343333a55f 100644 --- a/examples/peripherals/temp_sensor_esp32s2/main/CMakeLists.txt +++ b/examples/peripherals/temp_sensor_esp32s2/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "temp_sensor_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "temp_sensor_main.c" + INCLUDE_DIRS ".") diff --git a/examples/protocols/esp_local_ctrl/main/CMakeLists.txt b/examples/protocols/esp_local_ctrl/main/CMakeLists.txt index 87f57d1076..1438075309 100644 --- a/examples/protocols/esp_local_ctrl/main/CMakeLists.txt +++ b/examples/protocols/esp_local_ctrl/main/CMakeLists.txt @@ -1,8 +1,3 @@ -set(COMPONENT_SRCS "app_main.c" "esp_local_ctrl_service.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -set(COMPONENT_EMBED_TXTFILES - "certs/cacert.pem" - "certs/prvtkey.pem") - -register_component() +idf_component_register(SRCS "app_main.c" "esp_local_ctrl_service.c" + INCLUDE_DIRS "." + EMBED_TXTFILES "certs/cacert.pem" "certs/prvtkey.pem") diff --git a/examples/protocols/https_x509_bundle/main/CMakeLists.txt b/examples/protocols/https_x509_bundle/main/CMakeLists.txt index 9d4ce32ca0..cdc8385419 100644 --- a/examples/protocols/https_x509_bundle/main/CMakeLists.txt +++ b/examples/protocols/https_x509_bundle/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "https_x509_bundle_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "https_x509_bundle_example_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/protocols/mqtt/ssl_psk/main/CMakeLists.txt b/examples/protocols/mqtt/ssl_psk/main/CMakeLists.txt index 6b03500639..61fac40e63 100644 --- a/examples/protocols/mqtt/ssl_psk/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl_psk/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/security/flash_encryption/main/CMakeLists.txt b/examples/security/flash_encryption/main/CMakeLists.txt index de12ebda76..ce00c820da 100644 --- a/examples/security/flash_encryption/main/CMakeLists.txt +++ b/examples/security/flash_encryption/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "flash_encrypt_main.c") -set(COMPONENT_ADD_INCLUDEDIRS "") - -register_component() +idf_component_register(SRCS "flash_encrypt_main.c" + INCLUDE_DIRS ".") \ No newline at end of file diff --git a/examples/system/perfmon/main/CMakeLists.txt b/examples/system/perfmon/main/CMakeLists.txt index 68711fd3e0..50b7732953 100644 --- a/examples/system/perfmon/main/CMakeLists.txt +++ b/examples/system/perfmon/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "perfmon_example_main.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") - -register_component() +idf_component_register(SRCS "perfmon_example_main.c" + INCLUDE_DIRS ".") diff --git a/tools/test_apps/security/secure_boot/main/CMakeLists.txt b/tools/test_apps/security/secure_boot/main/CMakeLists.txt index 87f374903c..9cdeffe28a 100644 --- a/tools/test_apps/security/secure_boot/main/CMakeLists.txt +++ b/tools/test_apps/security/secure_boot/main/CMakeLists.txt @@ -1,4 +1,2 @@ -set(COMPONENT_SRCS "secure_boot_main.c") -set(COMPONENT_ADD_INCLUDEDIRS "") - -register_component() +idf_component_register(SRCS "secure_boot_main.c" + INCLUDE_DIRS ".")