diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-05 03:33:40 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-05 03:33:40 +0200 |
commit | 29950f9eddf803031d9158273e9280e177f109c8 (patch) | |
tree | 3ac26b8f3db35f0af160d41d44f5ce67c8dad755 | |
parent | 857488e91b588e73d46948988ffce18ed9cb59fc (diff) |
Add meson build
-rw-r--r-- | README.md | 6 | ||||
m--------- | depends/mglpp | 0 | ||||
-rwxr-xr-x | install.sh | 13 | ||||
-rw-r--r-- | meson.build | 26 | ||||
-rw-r--r-- | project.conf | 2 | ||||
-rwxr-xr-x | uninstall.sh | 10 |
6 files changed, 56 insertions, 1 deletions
@@ -1,2 +1,8 @@ # GPU Screen Recorder Notification Notification in the style of NVIDIA ShadowPlay. + +# Dependencies +x11, xrandr, xrender, xfixes, opengl + +# Installation +Run `sudo ./install.sh`. This will install gsr-notify to `/usr/bin/gsr-notify`. You can run meson commands manually to install gsr-notify to another directory.
\ No newline at end of file diff --git a/depends/mglpp b/depends/mglpp -Subproject 5d5a88afbc57ee72c7bbab05ee58aebd64ee3f6 +Subproject 7d23e514e3271690ddc465a21faa1fa24063826 diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..962a2f8 --- /dev/null +++ b/install.sh @@ -0,0 +1,13 @@ +#!/bin/sh -e + +script_dir=$(dirname "$0") +cd "$script_dir" + +[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1 + +rm -rf build +meson setup build +meson configure --prefix=/usr --buildtype=release -Dstrip=true build +ninja -C build install + +echo "Successfully installed gsr-notify" diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..90fa050 --- /dev/null +++ b/meson.build @@ -0,0 +1,26 @@ +project('gsr-notify', ['cpp'], version : '1.0.0', default_options : ['warning_level=2'], subproject_dir : 'depends') + +if get_option('buildtype') == 'debug' + add_project_arguments('-g3', language : ['cpp']) +elif get_option('buildtype') == 'release' + add_project_arguments('-DNDEBUG', language : ['cpp']) +endif + +src = [ + 'src/main.cpp', +] + +mglpp_proj = subproject('mglpp') +mglpp_dep = mglpp_proj.get_variable('mglpp_dep') + +dep = [ + mglpp_dep, + dependency('xfixes'), +] + +executable( + meson.project_name(), + src, + install : true, + dependencies : dep, +)
\ No newline at end of file diff --git a/project.conf b/project.conf index c3cfb3e..3c20791 100644 --- a/project.conf +++ b/project.conf @@ -1,5 +1,5 @@ [package] -name = "gpu-screen-recorder-notification" +name = "gsr-notify" type = "executable" version = "0.1.0" platforms = ["posix"] diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 0000000..ba0b5b6 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/sh -e + +script_dir=$(dirname "$0") +cd "$script_dir" + +[ $(id -u) -ne 0 ] && echo "You need root privileges to run the uninstall script" && exit 1 + +ninja -C build uninstall + +echo "Successfully uninstalled gsr-notify" |