Skip to content

Commit

Permalink
Add declare_dependency in meson build
Browse files Browse the repository at this point in the history
  • Loading branch information
franko committed Jul 1, 2019
1 parent cc38626 commit 46cdd7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pkg = import('pkgconfig')

bytecode_preload = get_option('preload')

lang_headers_dir = include_directories('.')
bc_headers_dir = include_directories('.')

subdir('lang')
subdir('src')
12 changes: 10 additions & 2 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,29 @@ luajit_dep = dependency('luajit')

liblang = static_library('ljlangtk',
lang_sources + lang_bc_headers,
include_directories: lang_headers_dir,
include_directories: bc_headers_dir,
c_args: lang_cflags,
dependencies: luajit_dep,
install: true,
)

luajit_x = executable('luajit-x',
['luajit-x.c'] + lang_bc_headers,
include_directories: lang_headers_dir,
include_directories: bc_headers_dir,
dependencies: luajit_dep,
c_args: lang_cflags,
link_with: liblang,
install: true,
)

liblang_dep = declare_dependency(
include_directories: include_directories('.'),
link_with: liblang,
dependencies: luajit_dep,
)

install_headers('language.h', 'language_loaders.h')

pkg.generate(liblang,
filebase : 'ljlangtk',
name : 'LuaJIT Lang Toolkit',
Expand Down

0 comments on commit 46cdd7e

Please sign in to comment.