Fix Logger and other build issues (#7)
All checks were successful
Build ptprnt / build (push) Successful in 1m49s
All checks were successful
Build ptprnt / build (push) Successful in 1m49s
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
This commit is contained in:
38
meson.build
38
meson.build
@@ -17,45 +17,15 @@ endif
|
||||
|
||||
incdir = include_directories('src')
|
||||
|
||||
ptprnt_hpps = [
|
||||
'src/libusbwrap/interface/IUsbDeviceFactory.hpp',
|
||||
'src/libusbwrap/interface/IUsbDevice.hpp',
|
||||
'src/libusbwrap/UsbDeviceFactory.hpp',
|
||||
'src/libusbwrap/LibUsbTypes.hpp',
|
||||
'src/libusbwrap/UsbDevice.hpp',
|
||||
'src/interface/IPrinterDriver.hpp',
|
||||
'src/interface/IPrinterTypes.hpp',
|
||||
'src/P700Printer.hpp',
|
||||
'src/PtouchPrint.hpp',
|
||||
'src/graphics/Bitmap.hpp',
|
||||
'src/graphics/Image.hpp',
|
||||
'src/graphics/Monochrome.hpp'
|
||||
]
|
||||
|
||||
ptprnt_srcs = [
|
||||
'src/PtouchPrint.cpp',
|
||||
'src/P700Printer.cpp',
|
||||
'src/graphics/Image.cpp',
|
||||
'src/graphics/Bitmap.cpp',
|
||||
'src/graphics/Monochrome.cpp',
|
||||
'src/libusbwrap/UsbDeviceFactory.cpp',
|
||||
'src/libusbwrap/UsbDevice.cpp',
|
||||
]
|
||||
|
||||
ptprnt_lib = library('ptprnt',
|
||||
include_directories: incdir,
|
||||
install: true,
|
||||
dependencies: [usb_dep, log_dep, pangocairo_dep, cli11_dep],
|
||||
sources: [ptprnt_hpps, ptprnt_srcs])
|
||||
|
||||
ptprnt_dep = declare_dependency(include_directories: incdir,
|
||||
link_with: ptprnt_lib)
|
||||
subdir('src')
|
||||
|
||||
ptprnt_exe = executable(
|
||||
'ptprnt',
|
||||
'src/main.cpp',
|
||||
install: true,
|
||||
dependencies : [usb_dep, log_dep, cli11_dep, ptprnt_dep],
|
||||
dependencies : [usb_dep, log_dep, pangocairo_dep, cli11_dep],
|
||||
include_directories: incdir,
|
||||
sources: [ptprnt_srcs],
|
||||
cpp_args : ['-DPROJ_VERSION="'+meson.project_version()+'"'],
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user