Add a trace mode for usb tracing
This commit is contained in:
11
meson.build
11
meson.build
@@ -35,6 +35,15 @@ incdir = include_directories('src')
|
||||
|
||||
subdir('src')
|
||||
|
||||
# Build arguments
|
||||
cpp_args = ['-DPROJ_VERSION="' + meson.project_version() + '"']
|
||||
|
||||
# USB trace mode option (for debugging without sending to hardware)
|
||||
if get_option('usb_trace_only')
|
||||
cpp_args += ['-DUSB_TRACE_ONLY']
|
||||
message('USB_TRACE_ONLY enabled: USB data will be logged but not sent to device')
|
||||
endif
|
||||
|
||||
ptprnt_exe = executable(
|
||||
'ptprnt',
|
||||
'src/main.cpp',
|
||||
@@ -42,7 +51,7 @@ ptprnt_exe = executable(
|
||||
dependencies: [usb_dep, log_dep, fmt_dep, pangocairo_dep, cli11_dep],
|
||||
include_directories: incdir,
|
||||
sources: [ptprnt_srcs],
|
||||
cpp_args: ['-DPROJ_VERSION="' + meson.project_version() + '"'],
|
||||
cpp_args: cpp_args,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user