summaryrefslogtreecommitdiff
path: root/src/lib/elua/meson.build
blob: 33cb3f9733855a7ef0f4c7908b6440f9c2d5d37f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
elua_deps = [eina, eo, efl, ecore, ecore_file, intl]
if sys_osx == true
# 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
  luajit = dependency('luajit')
  lua = 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')]
  )
  elua_pub_deps = [lua]
else
  elua_pub_deps = [dependency('luajit')]
endif


elua_src = ['elua.c', 'io.c', 'cache.c']
elua_header_src = ['Elua.h']

elua_lib = library('elua',
    elua_src,
    dependencies: [m, dl] + elua_deps + elua_pub_deps,
    include_directories : config_dir + [include_directories(join_paths('..','..'))],
    install: true,
    c_args : package_c_args,
    version : meson.project_version()
)

elua = declare_dependency(
  include_directories: [include_directories('.')],
  link_with: elua_lib,
  dependencies: elua_pub_deps,
)

install_headers(elua_header_src,
  install_dir : dir_package_include,
)