aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-07-18 04:29:09 +0200
committerdec05eba <dec05eba@protonmail.com>2023-07-18 04:29:09 +0200
commitcbd62bda0252c919556b733e3db94fa431dbc29a (patch)
tree6290303f3e9d6ad1b03bfff3b04b967323c3c03e /build.sh
parent32a194dec5cf807a71e689ce9b51f269890d8b4b (diff)
Fix for wayland
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 572d354..aa1b992 100755
--- a/build.sh
+++ b/build.sh
@@ -1,11 +1,17 @@
#!/bin/sh -e
+script_dir=$(dirname "$0")
+cd "$script_dir"
+
+CC=${CC:-gcc}
+CXX=${CXX:-g++}
+
opts="-O2 -g0 -DNDEBUG -Wall -Wextra -Werror -s"
[ -n "$DEBUG" ] && opts="-O0 -g3 -Wall -Wextra -Werror";
-dependencies="gtk+-3.0 x11 xrandr libpulse"
+dependencies="gtk+-3.0 x11 xrandr libpulse libdrm wayland-egl wayland-client"
includes="$(pkg-config --cflags $dependencies)"
libs="$(pkg-config --libs $dependencies) -ldl"
gcc -c src/egl.c $opts $includes
g++ -c src/main.cpp $opts $includes
-g++ -o gpu-screen-recorder-gtk -O2 egl.o main.o $libs $opts
+g++ -o gpu-screen-recorder-gtk egl.o main.o $libs $opts