Skip to content

Commit

Permalink
Switch to meson build system
Browse files Browse the repository at this point in the history
  • Loading branch information
nowrep committed Sep 16, 2024
1 parent 97bbdde commit dee0464
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 35 deletions.
34 changes: 0 additions & 34 deletions Makefile

This file was deleted.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ AUR: [dualsensectl-git](https://aur.archlinux.org/packages/dualsensectl-git/)

### Dependencies

* meson
* libhidapi-hidraw
* libdbus-1
* libudev

### Building

make && make install
meson setup build
cd build
ninja
ninja install

### udev rules

Expand Down
2 changes: 2 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Copyright (c) 2020 Sony Interactive Entertainment
*/

#define _XOPEN_SOURCE 700

#include <unistd.h>
#include <stdio.h>
#include <stdbool.h>
Expand Down
30 changes: 30 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
project(
'dualsensectl',
'c',
version: '0.6.0',
license: 'GPLv2',
meson_version: '>=0.58.0',
default_options: [
'c_std=c11',
'warning_level=3',
],
)

add_project_arguments(
[
'-Wl,--exclude-libs=ALL',
'-DDUALSENSECTL_VERSION="@0@"'.format(meson.project_version()),
],
language: 'c',
)

udev = dependency('libudev')
dbus = dependency('dbus-1')
hidapi_hidraw = dependency('hidapi-hidraw')

executable(
'dualsensectl',
['main.c'],
dependencies: [udev, dbus, hidapi_hidraw],
install: true,
)

0 comments on commit dee0464

Please sign in to comment.