CppLuaPkg
CMake driven Conan / LuaDist packages with minimal C++ / Lua (/ Moonscript) demo project, with Lua state handled by sol2.
- Single CMakeLists.txt with conan integration via official plugin and
LuaDist integration via their
luadist
binary. - Assumes conan, LuaDist (and Moonscript) are already available on the system.
- Transpiles Moonscript as part of the build process, if any
.moon
files are found. - Lua/Moonscript directory structure is reflected in runtime output dir, so import paths are predictable.
- Demo installs
- Eigen math library listed in
conanfile.txt
via conan. - LuaJIT library in CMakeLists via LuaDist as a dependency for the main executable and subsequent Lua packages.
- Several Lua libraries and their dependencies (md5, luasocket, and lsqlite3) listed in
luadistfile.txt
via LuaDist.
- Eigen math library listed in
- Execution of demo will
- Load/execute Lua via sol2 (C++).
- Print an md5 hash (Moonscript).
- HTTP request www.google.com (Lua).
- Create an in-memory SQLite database and dump its contents (Lua).
- Print an Eigen vector (C++).
Limitations / Future work
- Once installed, LuaDist packages cannot be altered or removed by editing
luadistfile.txt
or CMake variables, instead you must either manually remove the generated.luadist
directory or use theluadist
command line.