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
This commit is contained in:
Virt 2024-11-09 23:24:23 +01:00
commit a3427f2a7f

View file

@ -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