summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2019-02-14 10:25:09 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-21 20:49:00 +0100
commit56a91961ce07337fb9e73f46298415426175d25a (patch)
tree28984f29325d148047e3a3459bc31febdbf5e38e /src
parent99c3d42efdb614ae17dec7321e2f9c919c3b8213 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/meson.build2
-rw-r--r--src/lib/edje/meson.build7
-rw-r--r--src/lib/elua/meson.build2
-rw-r--r--src/lib/evas/filters/meson.build35
-rw-r--r--src/lib/evas_goal/meson.build4
5 files changed, 35 insertions, 15 deletions
diff --git a/src/bin/edje/meson.build b/src/bin/edje/meson.build
index 89d6382fae..9269d3338d 100644
--- a/src/bin/edje/meson.build
+++ b/src/bin/edje/meson.build
@@ -2,7 +2,7 @@ subdir('epp')
2 2
3edje_bin_deps = [ 3edje_bin_deps = [
4 eina, eo, efl, m, 4 eina, eo, efl, m,
5 luajit, eet, evas, 5 lua, eet, evas,
6 ecore_file, ecore_input, 6 ecore_file, ecore_input,
7 ecore_imf, ecore_imf_evas, 7 ecore_imf, ecore_imf_evas,
8 embryo, efreet, eio, 8 embryo, efreet, eio,
diff --git a/src/lib/edje/meson.build b/src/lib/edje/meson.build
index 393383fbde..549553fd67 100644
--- a/src/lib/edje/meson.build
+++ b/src/lib/edje/meson.build
@@ -1,13 +1,12 @@
1edje_deps = [ 1edje_deps = [
2 eina, eo, efl, m, 2 eina, eo, efl, m,
3 luajit, eet, evas, ecore_evas, 3 eet, evas, ecore_evas,
4 ecore_file, ecore_input, 4 ecore_file, ecore_input,
5 ecore_imf, ecore_imf_evas, 5 ecore_imf, ecore_imf_evas,
6 embryo, efreet, eio, intl 6 embryo, efreet, eio, intl
7] 7]
8 8
9 9edje_pub_deps = [m, evas, eo, efl, lua]
10edje_pub_deps = [m, evas, eo, efl, luajit]
11 10
12if (get_option('physics')) 11if (get_option('physics'))
13 edje_deps += ephysics 12 edje_deps += ephysics
@@ -151,7 +150,7 @@ edje_src = [
151 150
152edje_lib = library('edje', 151edje_lib = library('edje',
153 edje_src, pub_eo_file_target, priv_eo_file_target, 152 edje_src, pub_eo_file_target, priv_eo_file_target,
154 dependencies: [edje_deps], 153 dependencies: edje_pub_deps + edje_deps,
155 include_directories : config_dir + [include_directories('.')], 154 include_directories : config_dir + [include_directories('.')],
156 install: true, 155 install: true,
157 c_args : [package_c_args], 156 c_args : [package_c_args],
diff --git a/src/lib/elua/meson.build b/src/lib/elua/meson.build
index 7e0c3af7ba..9f1d270bba 100644
--- a/src/lib/elua/meson.build
+++ b/src/lib/elua/meson.build
@@ -1,5 +1,5 @@
1elua_deps = [eina, eo, efl, ecore, ecore_file, intl] 1elua_deps = [eina, eo, efl, ecore, ecore_file, intl]
2elua_pub_deps = [luajit] 2elua_pub_deps = [dependency('luajit')]
3 3
4elua_src = ['elua.c', 'io.c', 'cache.c'] 4elua_src = ['elua.c', 'io.c', 'cache.c']
5elua_header_src = ['Elua.h'] 5elua_header_src = ['Elua.h']
diff --git a/src/lib/evas/filters/meson.build b/src/lib/evas/filters/meson.build
index 019b1d123c..78c896d939 100644
--- a/src/lib/evas/filters/meson.build
+++ b/src/lib/evas/filters/meson.build
@@ -7,13 +7,34 @@ evas_src += files([
7 'evas_filter_utils.c', 7 'evas_filter_utils.c',
8]) 8])
9 9
10luajit = dependency('luajit') 10luaold_interpreters = [
11if sys_osx == true 11 ['lua', ['>=5.1.0','<5.3.0']],
12# 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 12 ['lua51', ['>=5.1.0','<5.2.0']],
13 luajit = declare_dependency( 13 ['lua-5.1', ['>=5.1.0','<5.2.0']],
14 include_directories: include_directories(luajit.get_pkgconfig_variable('includedir')), 14 ['lua5.1', ['>=5.1.0','<5.2.0']],
15 link_args: ['-L'+luajit.get_pkgconfig_variable('libdir'), '-l'+luajit.get_pkgconfig_variable('libname')] 15 ['lua52', ['>=5.2.0','<5.3.0']],
16 ['lua-5.2', ['>=5.2.0','<5.3.0']],
17 ['lua5.2', ['>=5.2.0','<5.3.0']],
18]
19
20if get_option('lua-interpreter') == 'lua'
21 config_h.set('ENABLE_LUA_OLD', '1')
22 foreach l : luaold_interpreters
23 lua = dependency(l[0], version: l[1], required:false)
24 if lua.found() == true
25 break
26 endif
27 endforeach
28else
29 lua = dependency(get_option('lua-interpreter'))
30endif
31
32if sys_osx == true and get_option('lua-interpreter') == 'luajit'
33# 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
34 lua = declare_dependency(
35 include_directories: include_directories(lua.get_pkgconfig_variable('includedir')),
36 link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), '-l'+lua.get_pkgconfig_variable('libname')]
16 ) 37 )
17endif 38endif
18 39
19evas_deps += luajit 40evas_deps += lua
diff --git a/src/lib/evas_goal/meson.build b/src/lib/evas_goal/meson.build
index 60426ad526..5746006908 100644
--- a/src/lib/evas_goal/meson.build
+++ b/src/lib/evas_goal/meson.build
@@ -17,7 +17,7 @@ evas = declare_dependency(
17 17
18evas_bin = declare_dependency( 18evas_bin = declare_dependency(
19 link_with : [evas_lib], 19 link_with : [evas_lib],
20 dependencies : [eina, ecore, ector, emile, dependency('luajit')], 20 dependencies : [eina, ecore, ector, emile, lua],
21 include_directories : evas_include_directories 21 include_directories : evas_include_directories
22) 22)
23 23
@@ -32,5 +32,5 @@ pkgconfig.generate(evas_lib,
32 name : 'evas', 32 name : 'evas',
33 subdirs : ['evas-'+version_major] + tmp_package_subdirs, 33 subdirs : ['evas-'+version_major] + tmp_package_subdirs,
34 version : version_major + '.' + version_minor + '.' + version_micro, 34 version : version_major + '.' + version_minor + '.' + version_micro,
35 libraries : [eina, ecore, ector, emile, dependency('luajit')], 35 libraries : [eina, ecore, ector, emile, lua],
36) 36)