Skip to content

Adding, building and linking Lua in a project #45485

Answered by tenllado
oscarbaselga asked this question in Q&A
Discussion options

You must be logged in to vote

I could make this example run with the following project layout:

CMakeLists.txt
prj.conf
src
lua

The content of the CMakeLists.txt file is

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(sol)

add_library(liblua STATIC
lua/lapi.c
lua/lauxlib.c
lua/lbaselib.c
lua/lcode.c
lua/lcorolib.c
lua/lctype.c
lua/ldblib.c
lua/ldebug.c
lua/ldo.c
lua/ldump.c
lua/lfunc.c
lua/lgc.c
lua/linit.c
lua/liolib.c
lua/llex.c
lua/lmathlib.c
lua/lmem.c
lua/loadlib.c
lua/lobject.c
lua/lopcodes.c
lua/loslib.c
lua/lparser.c
lua/lstate.c
lua/lstring.c
lua/lstrlib.c
lua/ltable.c
lua/ltablib.c
lua/ltm.c
lua/lundump.c
lua/lutf8lib.c
lua/lvm.c
lua/lzio.c
)

target_include…

Replies: 6 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by oscarbaselga
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tenllado
Comment options

@rodrigopex
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug The issue is a bug, or the PR is fixing a bug
5 participants
Converted from issue

This discussion was converted from issue #45482 on May 09, 2022 12:14.