Skip to content

Commit da96623

Browse files
committed
py/usermod.cmake: If folder given for USER_C_MODULES add micropython.cmake.
Signed-off-by: Andrew Leech <[email protected]>
1 parent fff0117 commit da96623

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

py/usermod.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ endfunction()
4242
# Include CMake files for user modules.
4343
if (USER_C_MODULES)
4444
foreach(USER_C_MODULE_PATH ${USER_C_MODULES})
45+
# If a directory is given, append the micropython.cmake to it.
46+
if (IS_DIRECTORY ${USER_C_MODULE_PATH})
47+
set(USER_C_MODULE_PATH "${USER_C_MODULE_PATH}/micropython.cmake")
48+
endif()
4549
# Confirm the provided path exists, show abspath if not to make it clearer to fix.
4650
if (NOT EXISTS ${USER_C_MODULE_PATH})
4751
get_filename_component(USER_C_MODULES_ABS "${USER_C_MODULE_PATH}" ABSOLUTE)

0 commit comments

Comments
 (0)