Files
ptouch-prnt/meson.build
Moritz Martinius cd15930e1d
All checks were successful
Build ptprnt / build (push) Successful in 1m49s
Fix Logger and other build issues (#7)
This branch fixes a couple of issues with the build
- stop linking everything in a library which is then linked against a single main. It doesn't work the way I wanted. If functionality needs to be exposed by a library, it can be done later or with a separate target
- This should also fix spdlog
- Source files are now in a separate meson file using mesons files() feautre
- Improve coverage generation by adding a script generating html coverage reports. This will hopefully keep the motivation higher to create more unit tests
- Increase the code coverage a bit to demonstrate that statement above is not a fluke 😄

Reviewed-on: #7
2023-11-16 20:26:22 +00:00

42 lines
1.0 KiB
Meson

project('ptprnt', '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']
)
usb_dep = dependency('libusb-1.0')
log_dep = dependency('spdlog')
pangocairo_dep = dependency('pangocairo')
# CLI11
cli11_proj = subproject('cli11')
cli11_dep = cli11_proj.get_variable('CLI11_dep')
if not cli11_dep.found()
error('CLI11 not found, can not proceed')
endif
incdir = include_directories('src')
subdir('src')
ptprnt_exe = executable(
'ptprnt',
'src/main.cpp',
install: true,
dependencies : [usb_dep, log_dep, pangocairo_dep, cli11_dep],
include_directories: incdir,
sources: [ptprnt_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')