grino/meson.build

66 lines
1.8 KiB
Meson
Raw Normal View History

2023-09-10 23:05:29 +00:00
project('grino',
'cpp',
version: '0.0.0',
default_options: [
'warning_level=3',
'cpp_std=c++17'
])
2023-09-11 10:14:01 +00:00
grino_libdir = get_option('prefix') / get_option('libdir') / 'grino'
2023-09-10 23:05:29 +00:00
conf = configuration_data()
conf.set('version', meson.project_version())
2023-09-11 10:14:01 +00:00
conf.set('libdir', grino_libdir)
2023-09-10 23:05:29 +00:00
configure_file(input: 'src/config.in.hpp',
output: 'config.hpp',
configuration: conf)
grino_src = static_library('grino',
sources: [
'src/Compiler.cpp',
'src/Lexer.cpp',
'src/Loc.cpp',
'src/Logger.cpp',
'src/Node.cpp',
'src/Parser.cpp',
'src/Program.cpp',
'src/VM.cpp',
'src/Value.cpp',
2023-09-11 10:14:01 +00:00
'src/Function.cpp',
2023-09-11 06:00:50 +00:00
'src/SymTable.cpp',
2023-09-11 10:14:01 +00:00
'src/Loader.cpp',
2023-09-10 23:05:29 +00:00
])
grino_dep = declare_dependency(link_with: grino_src)
2023-09-11 10:14:01 +00:00
shared_library('grino_core',
sources: [
'lib/core.cpp'
],
dependencies: [
grino_dep
],
install: true,
install_dir: grino_libdir)
2023-09-10 23:05:29 +00:00
executable('grino',
sources: [
'src/main.cpp'
],
dependencies: [
grino_dep
],
install: true)
executable('grino-tests',
sources: [
'tests/main.cpp',
'tests/Lexer.cpp',
'tests/Parser.cpp',
],
dependencies: [
grino_dep,
dependency('catch2')
])