34 lines
760 B
Meson
34 lines
760 B
Meson
project('shmem', 'cpp',
|
|
version: 'v0.1.0-'+run_command('git', 'rev-parse', '--short', 'HEAD', check: true).stdout().strip(),
|
|
license: 'GPLv3',
|
|
default_options : ['c_std=c11', 'cpp_std=c++17']
|
|
)
|
|
|
|
log_dep = dependency('spdlog')
|
|
fmt_dep = dependency('fmt')
|
|
|
|
incdir = include_directories('src')
|
|
|
|
subdir('src')
|
|
|
|
executable(
|
|
'shmem',
|
|
'src/main.cpp',
|
|
install: true,
|
|
dependencies : [log_dep, fmt_dep],
|
|
include_directories: incdir,
|
|
sources: [srcs],
|
|
cpp_args : ['-DPROJ_VERSION="'+meson.project_version()+'"'],
|
|
)
|
|
|
|
|
|
### Unit tests
|
|
|
|
# GTest
|
|
gtest_proj = subproject('gtest')
|
|
gtest_dep = gtest_proj.get_variable('gtest_main_dep')
|
|
if not gtest_dep.found()
|
|
error('MESON_SKIP_TEST: gtest not installed.')
|
|
endif
|
|
|
|
subdir('tests') |