2022-12-19 16:04:09 -07:00
|
|
|
project('mouse_m908', ['cpp', 'c'],
|
|
|
|
version: '3.3',
|
|
|
|
meson_version: '>= 0.59.0',
|
|
|
|
default_options: [ 'warning_level=2',
|
2023-08-14 16:00:09 -06:00
|
|
|
'cpp_std=c++17',
|
2022-12-19 16:04:09 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
libusb_dep = dependency('libusb-1.0')
|
|
|
|
|
|
|
|
sources = files(
|
|
|
|
'mouse_m908.cpp',
|
|
|
|
'include/data.cpp',
|
|
|
|
'include/help.h',
|
|
|
|
'include/load_config.cpp',
|
|
|
|
'include/load_config.h',
|
|
|
|
'include/rd_mouse.cpp',
|
|
|
|
'include/rd_mouse.h',
|
|
|
|
'include/rd_mouse_wireless.cpp',
|
2023-08-14 15:29:04 -06:00
|
|
|
'include/rd_mouse_wireless.h'
|
2022-12-19 16:04:09 -07:00
|
|
|
)
|
|
|
|
|
2023-08-14 15:29:04 -06:00
|
|
|
devices = ['generic', 'm607', 'm686', 'm709', 'm711', 'm715', 'm719', 'm721', 'm908', 'm913', 'm990', 'm990chroma']
|
|
|
|
|
|
|
|
foreach device : devices
|
|
|
|
sources += files(
|
|
|
|
f'include/@device@/constructor.cpp',
|
|
|
|
f'include/@device@/data.cpp',
|
|
|
|
f'include/@device@/getters.cpp',
|
|
|
|
f'include/@device@/helpers.cpp',
|
|
|
|
f'include/@device@/mouse_@device@.h',
|
|
|
|
f'include/@device@/readers.cpp',
|
|
|
|
f'include/@device@/setters.cpp',
|
|
|
|
f'include/@device@/writers.cpp'
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
2022-12-19 16:04:09 -07:00
|
|
|
executable('mouse_m908', sources,
|
|
|
|
dependencies: [libusb_dep],
|
|
|
|
install: true,
|
|
|
|
)
|
|
|
|
if host_machine.system() == 'linux'
|
2023-08-14 15:55:41 -06:00
|
|
|
udev_dep = dependency('udev')
|
|
|
|
udev_rules_dir = udev_dep.get_variable(pkgconfig:'udevdir')
|
2022-12-19 16:04:09 -07:00
|
|
|
install_data('mouse_m908.rules',
|
|
|
|
install_dir: join_paths(udev_rules_dir, 'rules.d')
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
install_data('mouse_m908.1',
|
|
|
|
install_dir: get_option('mandir')
|
|
|
|
)
|
|
|
|
|