From a3427f2a7f1dc70236dbaa870eadead03d9807a6 Mon Sep 17 00:00:00 2001 From: Virt <41426325+VirtCode@users.noreply.github.com> Date: Sat, 9 Nov 2024 23:24:23 +0100 Subject: [PATCH] fix: fix build with headers from hyprpm because some includes in hyprland are not relative but absolute, we need to add the hyprland src/ directory as an include path. we do this by modifying the output of pkg-config fixes #38 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 99532e8..0a265c8 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ all: $(PLUGIN_NAME).so $(PLUGIN_NAME).so: $(SOURCE_FILES) mkdir -p out - g++ -shared -Wall --no-gnu-unique -fPIC $(SOURCE_FILES) -g -I /usr/include/hyprland/src `pkg-config --cflags pixman-1 libdrm hyprland` -std=c++23 -o out/$(PLUGIN_NAME).so + g++ -shared -Wall --no-gnu-unique -fPIC $(SOURCE_FILES) -g `pkg-config --cflags hyprland | awk '{print $$NF "/src";}'` `pkg-config --cflags pixman-1 libdrm hyprland` -std=c++23 -o out/$(PLUGIN_NAME).so clean: rm -f out/$(PLUGIN_NAME).so