Define WLR_USE_UNSTABLE in Makefile, not directly in main.cpp

This commit is contained in:
ItsDrike 2023-06-07 00:32:58 +02:00
parent 0759df0727
commit 6bc69d03d6
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 4 additions and 4 deletions

View file

@ -7,6 +7,8 @@ INSTALL_LOCATION=${HOME}/.local/share/hyprload/plugins/bin
SOURCE_FILES=$(wildcard src/*.cpp)
COMPILE_DEFINES=-DWLR_USE_UNSTABLE
COMPILE_FLAGS=-g -fPIC --no-gnu-unique -std=c++23
COMPILE_FLAGS+=`pkg-config --cflags pixman-1 libdrm hyprland`
COMPILE_FLAGS+=-Iinclude
@ -30,13 +32,13 @@ check_env:
fi
$(PLUGIN_NAME).so: $(SOURCE_FILES) $(INCLUDE_FILES)
g++ $(LINK_FLAGS) $(COMPILE_FLAGS) $(SOURCE_FILES) -o $(PLUGIN_NAME).so
g++ $(LINK_FLAGS) $(COMPILE_FLAGS) $(COMPILE_DEFINES) $(SOURCE_FILES) -o $(PLUGIN_NAME).so
clean:
rm ./${PLUGIN_NAME}.so
clangd:
echo "$(COMPILE_FLAGS)" | \
echo "$(COMPILE_FLAGS) $(COMPILE_DEFINES)" | \
sed 's/--no-gnu-unique//g' | \
sed 's/ -/\n-/g' | \
sed 's/std=c++23/std=c++2b/g' \

View file

@ -1,5 +1,3 @@
#define WLR_USE_UNSTABLE
#include "globals.hpp"
#include <hyprland/src/Window.hpp>