Handle selecting lua implementation in meson.build
This commit is contained in:
16
meson.build
16
meson.build
@@ -25,7 +25,7 @@ glava_dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
if cc.get_id() == 'clang'
|
if cc.get_id() == 'clang'
|
||||||
add_project_arguments('-fblocks', language: 'c')
|
add_project_arguments('-fblocks', language: 'c')
|
||||||
glava_dependencies += cc.find_library('BlocksRuntime')
|
glava_dependencies += cc.find_library('BlocksRuntime')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -109,18 +109,28 @@ if not get_option('disable_config')
|
|||||||
).stdout().strip().split('\n')
|
).stdout().strip().split('\n')
|
||||||
glava_config_lua_targets += s + '.' + luac_output_ext
|
glava_config_lua_targets += s + '.' + luac_output_ext
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
luac_name = 'luac' + get_option('lua_version')
|
||||||
|
luac_impl = get_option('lua_implementation')
|
||||||
|
if get_option('lua_implementation') == 'luajit'
|
||||||
|
luac_name = 'luajit'
|
||||||
|
luac_impl += '-'
|
||||||
|
endif
|
||||||
|
|
||||||
luac_target = custom_target(
|
luac_target = custom_target(
|
||||||
'glava-config-luac',
|
'glava-config-luac',
|
||||||
input: generator(
|
input: generator(
|
||||||
find_program('luac'),
|
find_program(luac_name),
|
||||||
output: '@BASENAME@.' + luac_output_ext,
|
output: '@BASENAME@.' + luac_output_ext,
|
||||||
arguments: ['-o', '@OUTPUT@', '@INPUT@']).process(glava_config_lua_sources),
|
arguments: ['-o', '@OUTPUT@', '@INPUT@']).process(glava_config_lua_sources),
|
||||||
output: glava_config_lua_targets,
|
output: glava_config_lua_targets,
|
||||||
command: [find_program('cp'), '-t', '@OUTDIR@', '@INPUT@'],
|
command: [find_program('cp'), '-t', '@OUTDIR@', '@INPUT@'],
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: get_option('lua_install_dir') + '/glava-config')
|
install_dir: get_option('lua_install_dir') + '/' +
|
||||||
|
get_option('lua_implementation') + '/' +
|
||||||
|
get_option('lua_version') + '/' +
|
||||||
|
'glava-config')
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
'glava-config',
|
'glava-config',
|
||||||
|
|||||||
@@ -12,8 +12,12 @@ option('disable_config', type: 'boolean', value: true,
|
|||||||
description: 'Skip building GLava GTK+ configuration tool')
|
description: 'Skip building GLava GTK+ configuration tool')
|
||||||
option('shader_install_dir', type: 'string', value: '/etc/xdg',
|
option('shader_install_dir', type: 'string', value: '/etc/xdg',
|
||||||
description: 'GLSL config/module system install directory')
|
description: 'GLSL config/module system install directory')
|
||||||
option('lua_install_dir', type: 'string', value: '/usr/share/lua/5.3',
|
option('lua_install_dir', type: 'string', value: '/usr/share',
|
||||||
description: 'Location to install Lua 5.3 modules for glava-config')
|
description: 'Location to install Lua modules for glava-config')
|
||||||
|
option('lua_version', type: 'string', value: '5.3',
|
||||||
|
description: 'Lua version to use for glava-config')
|
||||||
|
option('lua_implementation', type: 'string', value: 'lua',
|
||||||
|
description: 'Lua implementation to use (\'lua\' or \'luajit\')')
|
||||||
option('resource_install_dir', type: 'string', value: '/usr/share/glava',
|
option('resource_install_dir', type: 'string', value: '/usr/share/glava',
|
||||||
description: 'Location to install generic GLava resources')
|
description: 'Location to install generic GLava resources')
|
||||||
option('obs_plugin_install_dir', type: 'string', value: '/usr/lib/obs-plugins',
|
option('obs_plugin_install_dir', type: 'string', value: '/usr/lib/obs-plugins',
|
||||||
|
|||||||
Reference in New Issue
Block a user