diff --git a/examples/NonArduino/ESP-IDF/.gitignore b/examples/NonArduino/ESP-IDF/.gitignore new file mode 100644 index 00000000..f9b3ce28 --- /dev/null +++ b/examples/NonArduino/ESP-IDF/.gitignore @@ -0,0 +1,3 @@ +# generated by ESP-IDF +managed_components/ +dependencies.lock diff --git a/examples/NonArduino/ESP-IDF/components/RadioLib/CMakeLists.txt b/examples/NonArduino/ESP-IDF/components/RadioLib/CMakeLists.txt deleted file mode 100644 index 6adf691b..00000000 --- a/examples/NonArduino/ESP-IDF/components/RadioLib/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# this is required for ESP IDF -idf_component_register() - -# if you did not build RadioLib as shared library (see wiki), -# you will have to add it as source directory -# the following is just an example, yours will likely be different -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../RadioLib" "${CMAKE_CURRENT_BINARY_DIR}/RadioLib") - -# link RadioLib as interface -target_link_libraries(${COMPONENT_LIB} INTERFACE RadioLib) diff --git a/examples/NonArduino/ESP-IDF/main/CMakeLists.txt b/examples/NonArduino/ESP-IDF/main/CMakeLists.txt index 52e01833..1f571164 100644 --- a/examples/NonArduino/ESP-IDF/main/CMakeLists.txt +++ b/examples/NonArduino/ESP-IDF/main/CMakeLists.txt @@ -1,4 +1,4 @@ -# register the component and set "RadioLib", "esp_timer" and "driver" ad required +# register the component and set "RadioLib", "esp_timer" and "driver" as required idf_component_register(SRCS "main.cpp" INCLUDE_DIRS "." REQUIRES RadioLib esp_timer driver) diff --git a/examples/NonArduino/ESP-IDF/main/idf_component.yml b/examples/NonArduino/ESP-IDF/main/idf_component.yml new file mode 100644 index 00000000..38382f42 --- /dev/null +++ b/examples/NonArduino/ESP-IDF/main/idf_component.yml @@ -0,0 +1,7 @@ +dependencies: + RadioLib: + # referenced locally because the example is a part of the repository itself + # under normal circumstances, it's preferrable to reference the repository instead + # for other options, see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html + path: ../../../../../RadioLib + #git: https://github.com/jgromes/RadioLib.git