cmake:implement CMake build for NuttX Lua interpreter

add CMake module for register lua mod
nsh> lua
Lua 5.4.0  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> hello.say_hello()
Hello World!
> io.write("abs is =",math.abs(-10),"\n")
abs is =10
> os.exit()
nsh>

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2024-07-31 12:08:02 +08:00 committed by Xiang Xiao
parent 1f51bfe64d
commit 3d8dc5dce5
4 changed files with 253 additions and 0 deletions

View file

@ -27,6 +27,9 @@
# ~~~
if(CONFIG_APPS_DIR)
# add apps cmake modules
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
include(nuttx_add_luamod)
nuttx_add_library(apps)
if(NOT EXISTS {NUTTX_APPS_BINDIR}/dummy.c)
file(TOUCH ${NUTTX_APPS_BINDIR}/dummy.c)