meson: add a option for selecting lua interpreter
this patch is for selecting lua interpreter such as luajit, lua51 and in addition, little more changes to unify lua dependency over efl Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7564
This commit is contained in:
parent
99c3d42efd
commit
56a91961ce
|
@ -287,7 +287,7 @@ subprojects = [
|
|||
['efreet' ,[] , false, false, true, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['ecore_imf_evas' ,[] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['ephysics' ,['physics'] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', 'luajit'], []],
|
||||
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', get_option('lua-interpreter')], []],
|
||||
['emotion' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], []],
|
||||
['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []],
|
||||
|
|
|
@ -323,6 +323,13 @@ option('mono-beta',
|
|||
description: 'Flag for enabling @beta Eo methods in the api'
|
||||
)
|
||||
|
||||
option('lua-interpreter',
|
||||
type: 'combo',
|
||||
choices: ['luajit', 'lua'],
|
||||
value: 'luajit',
|
||||
description: 'Select a type of lua interpreter to use it for edje and evas'
|
||||
)
|
||||
|
||||
option('native-arch-optimization',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
|
|
|
@ -2,7 +2,7 @@ subdir('epp')
|
|||
|
||||
edje_bin_deps = [
|
||||
eina, eo, efl, m,
|
||||
luajit, eet, evas,
|
||||
lua, eet, evas,
|
||||
ecore_file, ecore_input,
|
||||
ecore_imf, ecore_imf_evas,
|
||||
embryo, efreet, eio,
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
edje_deps = [
|
||||
eina, eo, efl, m,
|
||||
luajit, eet, evas, ecore_evas,
|
||||
eet, evas, ecore_evas,
|
||||
ecore_file, ecore_input,
|
||||
ecore_imf, ecore_imf_evas,
|
||||
embryo, efreet, eio, intl
|
||||
]
|
||||
|
||||
|
||||
edje_pub_deps = [m, evas, eo, efl, luajit]
|
||||
edje_pub_deps = [m, evas, eo, efl, lua]
|
||||
|
||||
if (get_option('physics'))
|
||||
edje_deps += ephysics
|
||||
|
@ -151,7 +150,7 @@ edje_src = [
|
|||
|
||||
edje_lib = library('edje',
|
||||
edje_src, pub_eo_file_target, priv_eo_file_target,
|
||||
dependencies: [edje_deps],
|
||||
dependencies: edje_pub_deps + edje_deps,
|
||||
include_directories : config_dir + [include_directories('.')],
|
||||
install: true,
|
||||
c_args : [package_c_args],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
elua_deps = [eina, eo, efl, ecore, ecore_file, intl]
|
||||
elua_pub_deps = [luajit]
|
||||
elua_pub_deps = [dependency('luajit')]
|
||||
|
||||
elua_src = ['elua.c', 'io.c', 'cache.c']
|
||||
elua_header_src = ['Elua.h']
|
||||
|
|
|
@ -7,13 +7,34 @@ evas_src += files([
|
|||
'evas_filter_utils.c',
|
||||
])
|
||||
|
||||
luajit = dependency('luajit')
|
||||
if sys_osx == true
|
||||
# luajit on macos is broken, this means we need to generate our own dependency with our arguments, a library later still needs to link to luajit for the pagesize argument thingy
|
||||
luajit = declare_dependency(
|
||||
include_directories: include_directories(luajit.get_pkgconfig_variable('includedir')),
|
||||
link_args: ['-L'+luajit.get_pkgconfig_variable('libdir'), '-l'+luajit.get_pkgconfig_variable('libname')]
|
||||
luaold_interpreters = [
|
||||
['lua', ['>=5.1.0','<5.3.0']],
|
||||
['lua51', ['>=5.1.0','<5.2.0']],
|
||||
['lua-5.1', ['>=5.1.0','<5.2.0']],
|
||||
['lua5.1', ['>=5.1.0','<5.2.0']],
|
||||
['lua52', ['>=5.2.0','<5.3.0']],
|
||||
['lua-5.2', ['>=5.2.0','<5.3.0']],
|
||||
['lua5.2', ['>=5.2.0','<5.3.0']],
|
||||
]
|
||||
|
||||
if get_option('lua-interpreter') == 'lua'
|
||||
config_h.set('ENABLE_LUA_OLD', '1')
|
||||
foreach l : luaold_interpreters
|
||||
lua = dependency(l[0], version: l[1], required:false)
|
||||
if lua.found() == true
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
else
|
||||
lua = dependency(get_option('lua-interpreter'))
|
||||
endif
|
||||
|
||||
if sys_osx == true and get_option('lua-interpreter') == 'luajit'
|
||||
# luajit on macro is broken, this means we need to generate our own dependency with our arguments, a library later still needs to link to luajit for the pagesize argument thingy
|
||||
lua = declare_dependency(
|
||||
include_directories: include_directories(lua.get_pkgconfig_variable('includedir')),
|
||||
link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), '-l'+lua.get_pkgconfig_variable('libname')]
|
||||
)
|
||||
endif
|
||||
|
||||
evas_deps += luajit
|
||||
evas_deps += lua
|
||||
|
|
|
@ -17,7 +17,7 @@ evas = declare_dependency(
|
|||
|
||||
evas_bin = declare_dependency(
|
||||
link_with : [evas_lib],
|
||||
dependencies : [eina, ecore, ector, emile, dependency('luajit')],
|
||||
dependencies : [eina, ecore, ector, emile, lua],
|
||||
include_directories : evas_include_directories
|
||||
)
|
||||
|
||||
|
@ -32,5 +32,5 @@ pkgconfig.generate(evas_lib,
|
|||
name : 'evas',
|
||||
subdirs : ['evas-'+version_major] + tmp_package_subdirs,
|
||||
version : version_major + '.' + version_minor + '.' + version_micro,
|
||||
libraries : [eina, ecore, ector, emile, dependency('luajit')],
|
||||
libraries : [eina, ecore, ector, emile, lua],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue