diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-30 18:22:41 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-30 18:22:41 +0100 |
commit | ba9f12810f7dc4969ac175f6e959d5fe6407747d (patch) | |
tree | f4039e46985d56bac471bd8568f96b159a92b2ae /rust/qmk-hid-com/src_c/meson.build | |
parent | feat(src): Make usable (diff) | |
download | qmk_layout-ba9f12810f7dc4969ac175f6e959d5fe6407747d.zip |
feat(treewide): Migrate the Unicode handling to a custom c program, that works via rawhid
Diffstat (limited to '')
-rw-r--r-- | rust/qmk-hid-com/src_c/meson.build | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/rust/qmk-hid-com/src_c/meson.build b/rust/qmk-hid-com/src_c/meson.build new file mode 100644 index 0000000..9e8357f --- /dev/null +++ b/rust/qmk-hid-com/src_c/meson.build @@ -0,0 +1,51 @@ +# This is heavily based on `wtype` + +project( + 'qmk-unicode-type', 'c', + version: '0.1', + license: 'GPL-3.0-or-later', + default_options : [ + 'buildtype=release', + 'default_library=static' + ], +) + +git = find_program('git', native: true, required: false) + +if not git.found() + add_project_arguments('-DVERSION="@0@"'.format(meson.project_version()), language: 'c') +else + git_commit_hash = run_command([git.full_path(), 'describe', '--always', '--tags'], check: true).stdout().strip() + git_branch = run_command([git.full_path(), 'rev-parse', '--abbrev-ref', 'HEAD'], check: true).stdout().strip() + version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch) + add_project_arguments('-DVERSION=@0@'.format(version), language: 'c') +endif +cc = meson.get_compiler('c') + + +wayland_client = dependency('wayland-client') +libhid = dependency('hidapi-hidraw') +rt = cc.find_library('rt') + + + +src_files = files( + './src/error.c', + './src/hid/hid.c', + './src/keyboard/keyboard.c', + './src/main.c', +) + +subdir('protocol') + +executable( + meson.project_name(), + src_files, + dependencies: [ + client_protos, + wayland_client, + libhid, + rt, + ], +) + |