Skip to content

Commit

Permalink
py/usermod.cmake: If folder given for USER_C_MODULES add micropython.…
Browse files Browse the repository at this point in the history
…cmake.

Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
  • Loading branch information
pi-anl committed Oct 16, 2024
1 parent fff0117 commit da96623
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions py/usermod.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ endfunction()
# Include CMake files for user modules.
if (USER_C_MODULES)
foreach(USER_C_MODULE_PATH ${USER_C_MODULES})
# If a directory is given, append the micropython.cmake to it.
if (IS_DIRECTORY ${USER_C_MODULE_PATH})
set(USER_C_MODULE_PATH "${USER_C_MODULE_PATH}/micropython.cmake")
endif()
# Confirm the provided path exists, show abspath if not to make it clearer to fix.
if (NOT EXISTS ${USER_C_MODULE_PATH})
get_filename_component(USER_C_MODULES_ABS "${USER_C_MODULE_PATH}" ABSOLUTE)
Expand Down

0 comments on commit da96623

Please sign in to comment.