This repository has been archived on 2024-03-07. You can view files and clone it, but cannot push or open issues/pull-requests.
zarn/meson.build

84 lines
2.2 KiB
Meson
Raw Permalink Normal View History

project('zarn',
'cpp',
version: '0.0.0',
default_options: [
'prefix=/usr',
'warning_level=3',
'cpp_std=c++17'
])
# CONFIGURATIONS
# ==============
extra_libdir = get_option('prefix') / get_option('libdir') / 'zarn'
conf = configuration_data()
conf.set('version', meson.project_version())
conf.set('libdir', extra_libdir)
configure_file(input: 'src/config.in.hpp',
output: 'config.hpp',
configuration: conf)
# ZARN_LIB
# ========
zarn_lib = shared_library('zarn',
sources: [
'src/Module.cpp',
'src/Loc.cpp',
'src/Node.cpp',
'src/Logger.cpp',
'src/Lexer.cpp',
2023-09-17 19:36:58 +00:00
'src/Parser.cpp',
'src/StaticPass.cpp',
2023-09-17 19:36:58 +00:00
'src/Compiler.cpp',
'src/Program.cpp',
'src/VM.cpp',
'src/Constant.cpp',
'src/SymTable.cpp',
'src/NativeFunction.cpp',
'src/Prototype.cpp',
'src/NativeMacro.cpp',
'src/Zarn.cpp',
],
install: true)
zarn_dep = declare_dependency(link_with: zarn_lib)
# STANDARD LIBRARY
# ================
shared_library('zarn-std',
sources: [
'libstd/std.cpp',
'libstd/fun.cpp',
'libstd/macro.cpp',
],
dependencies: [
zarn_dep
],
install_dir: extra_libdir,
install: true)
# COMPILER
# ========
executable('zarn',
sources: [
'src/main.cpp'
],
dependencies: [
zarn_dep
],
install: true)
# TESTS
# =====
executable('zarn-tests',
sources: [
'tests/main.cpp',
'tests/Lexer.cpp',
'tests/Parser.cpp',
],
dependencies: [
zarn_dep,
dependency('catch2')
])