mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
cmake: Add component dependency support
Components should set the COMPONENT_REQUIRES & COMPONENT_PRIVATE_REQUIRES variables to define their requirements.
This commit is contained in:

committed by
Angus Gratton

parent
4a2f1f0354
commit
1cb5712463
@@ -180,6 +180,11 @@ def convert_component(project_path, component_path):
|
||||
|
||||
with open(cmakelists_path, "w") as f:
|
||||
f.write("set(COMPONENT_ADD_INCLUDEDIRS %s)\n\n" % component_add_includedirs)
|
||||
|
||||
f.write("# Edit following two lines to set component requirements (see docs)\n")
|
||||
f.write("set(COMPONENT_REQUIRES "")\n")
|
||||
f.write("set(COMPONENT_PRIV_REQUIRES "")\n\n")
|
||||
|
||||
if component_srcdirs is not None:
|
||||
f.write("set(COMPONENT_SRCDIRS %s)\n\n" % component_srcdirs)
|
||||
f.write("register_component()\n")
|
||||
|
Reference in New Issue
Block a user