rizin/subprojects/rizin-shell-parser/meson.build
amibranch 8e6b764fb5
build: Improved meson-build to use rizin as subproject (#4684)
* Setting GNU99/C99 standard for subprojects
* Remove use of `add_global_arguments`
* Added extern "C" linkage specification to some public headers of rizin
* Changed the meson_git_wrapper.py-script to explicitly specify the output-path
* Made the RIZIN_BUILD_PATH conditional in the integration-test meson-build

Co-authored-by: amibranch <amibranch@users.noreply.github.com>
2024-10-29 23:59:42 +08:00

29 lines
800 B
Meson

project('rizin-shell-parser', 'c',
license: 'LGPL-3.0-only',
meson_version: '>=0.55.0',
)
cc = meson.get_compiler('c')
if cc.has_argument('--std=c99')
add_project_arguments('--std=c99', language: ['c'])
endif
tree_sitter_dep = dependency('tree-sitter')
grammar_js = files('grammar.js')
tree_sitter_wrap_py = files('meson_tree_sitter_generate.py')
subdir('src')
libshell_parser = static_library('shell_parser', shell_parser_files,
include_directories: shell_parser_inc,
dependencies: tree_sitter_dep.partial_dependency(includes: true),
implicit_include_directories: true
)
shell_parser_dep = declare_dependency(
link_with: libshell_parser,
include_directories: shell_parser_inc,
dependencies: tree_sitter_dep
)
meson.override_dependency('rizin-shell-parser', shell_parser_dep)