78 lines
1.7 KiB
Meson
78 lines
1.7 KiB
Meson
project('joko',
|
|
'cpp',
|
|
version: '0.0.0',
|
|
default_options: [
|
|
'warning_level=3',
|
|
'cpp_std=c++17'
|
|
])
|
|
|
|
joko_libdir = get_option('prefix') / get_option('libdir') / 'joko'
|
|
|
|
conf = configuration_data()
|
|
conf.set('version', meson.project_version())
|
|
conf.set('libdir', joko_libdir)
|
|
|
|
configure_file(
|
|
input: 'lib/config.in.hpp',
|
|
output: 'config.hpp',
|
|
configuration: conf
|
|
)
|
|
|
|
joko_lib = static_library(
|
|
'joko',
|
|
sources: [
|
|
'lib/Node.cpp',
|
|
'lib/Loc.cpp',
|
|
|
|
'lib/Factory.cpp',
|
|
|
|
'lib/Logger.cpp',
|
|
'lib/Lexer.cpp',
|
|
'lib/Parser.cpp',
|
|
|
|
'lib/Type.cpp',
|
|
'lib/Value.cpp',
|
|
'lib/Function.cpp',
|
|
'lib/Code.cpp',
|
|
'lib/SymTable.cpp',
|
|
'lib/StaticPass.cpp',
|
|
'lib/Compiler.cpp',
|
|
'lib/Program.cpp',
|
|
'lib/VM.cpp',
|
|
'lib/Loader.cpp',
|
|
],
|
|
dependencies: [
|
|
])
|
|
|
|
joko_dep = declare_dependency(link_with: joko_lib)
|
|
|
|
|
|
joko_core_lib = shared_library('joko-core',
|
|
sources: [
|
|
'core/core.cpp'
|
|
],
|
|
dependencies: [
|
|
joko_dep
|
|
],
|
|
install: true,
|
|
install_dir: joko_libdir)
|
|
executable('joko',
|
|
sources: [
|
|
'src/main.cpp',
|
|
],
|
|
dependencies: [
|
|
joko_dep
|
|
],
|
|
install: true)
|
|
|
|
executable('joko-tests',
|
|
sources: [
|
|
'tests/main.cpp',
|
|
'tests/Lexer.cpp',
|
|
'tests/Parser.cpp',
|
|
],
|
|
dependencies: [
|
|
joko_dep,
|
|
dependency('catch2')
|
|
])
|