# c8-lua: c8ui apps and live tile providers written in Lua.
project(
'c8-lua',
'c',
version: '0.1.0',
license: 'CC0-1.0',
meson_version: '>=1.3.0',
default_options: ['c_std=c11', 'warning_level=2', 'buildtype=debugoptimized'],
)
add_project_arguments('-D_GNU_SOURCE', '-Wno-unused-parameter',
'-Wno-missing-field-initializers', language: 'c')
# Lua 5.4, the system's where it has one by that name. Where it hasn't
# (openSUSE's lua54-devel can't be installed beside luajit-devel, which
# mpv-devel wants) the pinned copy in subprojects/lua.wrap is fetched and
# built into the runner, so every app gets the same Lua either way. Not
# plain `lua`: that may be 5.5, or LuaJIT.
lua = dependency('lua-5.4', 'lua5.4', 'lua54',
version: ['>=5.4', '<5.5'],
fallback: ['lua', 'lua_dep'],
default_options: ['default_library=static', 'interpreter=false',
'loadlib=disabled', 'line_editing=disabled', 'warning_level=0'],
)
executable('c8-lua',
'src/main.c', 'src/ui.c', 'src/draw.c', 'src/sys.c',
dependencies: [
lua,
dependency('c8ui'),
dependency('c8-base'),
dependency('glib-2.0'),
dependency('gio-2.0'),
dependency('gdk-pixbuf-2.0'),
dependency('xkbcommon'),
meson.get_compiler('c').find_library('m', required: false),
],
install: true,
)
# Starts an app or a tile of your own from a template
install_data('tools/c8-lua-new', install_dir: get_option('bindir'),
install_mode: 'rwxr-xr-x')
# Things to read and copy
install_subdir('examples', install_dir: get_option('datadir') / 'c8-lua')
# Our own apps written in Lua are a project of their own: apps/lua