Skip to content

Commit

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

Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
  • Loading branch information
pi-anl committed Oct 16, 2024
1 parent ce9763f commit 2bd4bc8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions py/usermod.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ endfunction()
# Include CMake files for user modules.
if (USER_C_MODULES)
foreach(USER_C_MODULE_PATH ${USER_C_MODULES})
if (IS_DIRECTORY ${USER_C_MODULE_PATH})
set(USER_C_MODULE_PATH "${USER_C_MODULE_PATH}/micropython.cmake")
endif()
if (NOT EXISTS ${USER_C_MODULE_PATH})
get_filename_component(USER_C_MODULES_ABS "${USER_C_MODULE_PATH}" ABSOLUTE)
message(FATAL_ERROR "USER_C_MODULES doesn't exist: ${USER_C_MODULES_ABS}")
Expand Down

0 comments on commit 2bd4bc8

Please sign in to comment.