Skip to content

Commit c54102d

Browse files
committed
Update project_include.cmake
1 parent 3ead49b commit c54102d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

project_include.cmake

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function(convert_arduino_libraries_to_components)
8383
endforeach()
8484
endif()
8585

86-
message(STATUS "Created IDF component for ${child}")
86+
# We do not have 'src' folder. Import a flat structure (1.0 style)
8787
else()
8888
message(STATUS "Processing 1.0 compatible library '${child}' in '${libs_dir_abs}'")
8989
file(WRITE ${component_cmakelist} "idf_component_register(SRCS ")
@@ -111,12 +111,17 @@ function(convert_arduino_libraries_to_components)
111111
if(IS_DIRECTORY "${utility_dir}")
112112
file(APPEND ${component_cmakelist} "\"utility\" ")
113113
endif()
114-
114+
115115
# Require arduino and main components to suceed in compilation
116116
file(APPEND ${component_cmakelist} "PRIV_REQUIRES ${arduino_component_name} ${main_component_name})\n")
117-
118-
message(STATUS "Created IDF component for ${child}")
119117
endif()
118+
119+
message(STATUS "Created IDF component for ${child}")
120+
121+
# Include the component's CMakeLists.txt to execute it
122+
# add_subdirectory("${child_dir}") # Using this method produces the following error: 'Called idf_component_register from a non-component directory.'
123+
# list(APPEND EXTRA_COMPONENT_DIRS ${child_dir}) # Using this method does not help
124+
120125
else()
121126
message(STATUS "Skipped ${child}: Required 'library.properties' not found")
122127
endif()

0 commit comments

Comments
 (0)