Added: ESP-IDF Component support #25
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for ESP-IDF components
I added idf_components.yml and refactored CMakeLists.txt. These changes will allow entire repo to be directly pulled into any esp-idf as component.
Why an ESP Component?
ESP-IDF has it's own component and build system. Without these changes, users will need to depend on eez-studio to create the eez-flow library files file. This is undesirable if you like to change/patch/debug certain parts of the eez-flow library - because you have a crash for some reason. Your changes will be overwritten everytime you generate the project files within the eezstudio.
If these changes pulled in, user can just add the following lines to their idf_component.yml which will automatically pull in eez-open/eez-framework to their project. Should the user prefer, they can branch off-of eez-open/eez-framework and create their own "staged" component too. In my opinion this is a better separation of framework duties and project file duties.
How use eez-framework as an ESP component?
I branched off from your master and added these files so I can pull eez-framwork as a component:
Tested with ESP-IDF 5.4.1. Works out of the box.
I also submitted an ESP Component to the official repository from my branch : https://components.espressif.com/components/haruny/eez-framework/versions/0.0.1
This allows CLI support and better discovery of eez-framework (it was really buried within the links if you're an esp-idf user).
However, if you prefer to have your own official ESP Component, I can delete mine so that you can submit an official one.
Should you need, happy to help create your esp component as well.
One side benefit, previous commits on CMakeLists.txt was broken for esp-idf use. This change fixes it. All other esp-component benefits come from the idf_component.yml file.