Fix build errors for explicitly using libfmt
Some checks failed
Build ptprnt / build (push) Failing after 35s

This commit is contained in:
2023-11-19 14:22:48 +01:00
parent dd496a325b
commit e2c524f7c9
7 changed files with 12 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ jobs:
- name: install meson
run: apt-get -yq install meson
- name: Install build dependencies
run: apt-get -yq install libusb-1.0-0-dev libspdlog-dev libpango1.0-dev libcairo2-dev gcovr
run: apt-get -yq install libusb-1.0-0-dev libspdlog-dev libfmt-dev libpango1.0-dev libcairo2-dev gcovr
- name: setup builddir
run: meson setup builddir -Db_coverage=true
- name: build all targets

View File

@@ -19,7 +19,7 @@ pacman -S libusb spdlog pango cairo meson gcovr
Install dependencies on Debian/Ubuntu
``` bash
apt-get install libusb-1.0-0-dev libspdlog-dev libpango1.0-dev libcairo2-dev meson gcovr
apt-get install libusb-1.0-0-dev libspdlog-dev libfmt-dev libpango1.0-dev libcairo2-dev meson gcovr
```
## Build

View File

@@ -6,6 +6,7 @@ project('ptprnt', 'cpp',
usb_dep = dependency('libusb-1.0')
log_dep = dependency('spdlog')
fmt_dep = dependency('fmt')
pangocairo_dep = dependency('pangocairo')
# CLI11
@@ -23,7 +24,7 @@ ptprnt_exe = executable(
'ptprnt',
'src/main.cpp',
install: true,
dependencies : [usb_dep, log_dep, pangocairo_dep, cli11_dep],
dependencies : [usb_dep, log_dep, fmt_dep, pangocairo_dep, cli11_dep],
include_directories: incdir,
sources: [ptprnt_srcs],
cpp_args : ['-DPROJ_VERSION="'+meson.project_version()+'"'],

View File

@@ -30,6 +30,7 @@ namespace ptprnt {
class IPrinterDriver {
public:
virtual ~IPrinterDriver() = default;
virtual const std::string_view getDriverName() = 0;
virtual const std::string_view getName() = 0;
virtual const std::string_view getVersion() = 0;

View File

@@ -29,8 +29,8 @@
namespace libusbwrap {
class UsbDevice : public IUsbDevice {
public:
UsbDevice(libusb_context* ctx, libusb_device* dev);
~UsbDevice();
explicit UsbDevice(libusb_context* ctx, libusb_device* dev);
~UsbDevice() override;
// delete copy ctor and assignment
UsbDevice(const UsbDevice&) = delete;

View File

@@ -24,6 +24,7 @@ enum class Speed {
class IUsbDevice {
public:
virtual ~IUsbDevice() = default;
virtual bool open() = 0;
virtual void close() = 0;

View File

@@ -9,6 +9,7 @@
namespace libusbwrap {
class IUsbDeviceFactory {
public:
virtual ~IUsbDeviceFactory() = default;
virtual std::vector<std::shared_ptr<IUsbDevice>> findAllDevices() = 0;
virtual std::vector<std::shared_ptr<IUsbDevice>> findDevices(uint16_t vid, uint16_t pid) = 0;
};