mirror of
https://github.com/Trensa-Organization/split-monitor-workspaces.git
synced 2025-03-15 11:13:39 +01:00
Fix builds, support NO_XWAYLAND
This commit is contained in:
parent
d48b001b2e
commit
a1b5792ea0
2 changed files with 21 additions and 10 deletions
21
Makefile
21
Makefile
|
@ -10,10 +10,22 @@ COMPILE_FLAGS=-g -fPIC --no-gnu-unique -std=c++23
|
||||||
COMPILE_FLAGS+=-I "/usr/include/pixman-1"
|
COMPILE_FLAGS+=-I "/usr/include/pixman-1"
|
||||||
COMPILE_FLAGS+=-I "/usr/include/libdrm"
|
COMPILE_FLAGS+=-I "/usr/include/libdrm"
|
||||||
COMPILE_FLAGS+=-I "${HYPRLAND_HEADERS}"
|
COMPILE_FLAGS+=-I "${HYPRLAND_HEADERS}"
|
||||||
|
COMPILE_FLAGS+=-I "${HYPRLAND_HEADERS}/protocols"
|
||||||
COMPILE_FLAGS+=-I "${HYPRLAND_HEADERS}/subprojects/wlroots/include"
|
COMPILE_FLAGS+=-I "${HYPRLAND_HEADERS}/subprojects/wlroots/include"
|
||||||
COMPILE_FLAGS+=-I "${HYPRLAND_HEADERS}/subprojects/wlroots/build/include"
|
COMPILE_FLAGS+=-I "${HYPRLAND_HEADERS}/subprojects/wlroots/build/include"
|
||||||
COMPILE_FLAGS+=-Iinclude
|
COMPILE_FLAGS+=-Iinclude
|
||||||
|
|
||||||
|
COMPILE_DEFINES=-DWLR_USE_UNSTABLE
|
||||||
|
|
||||||
|
ifeq ($(shell whereis -b jq), "jq:")
|
||||||
|
$(error "jq not found. Please install jq.")
|
||||||
|
else
|
||||||
|
BUILT_WITH_NOXWAYLAND=$(shell hyprctl version -j | jq -r '.flags | .[]' | grep 'no xwayland')
|
||||||
|
ifneq ($(BUILT_WITH_NOXWAYLAND),)
|
||||||
|
COMPILE_DEFINES+=-DNO_XWAYLAND
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: clean clangd
|
.PHONY: clean clangd
|
||||||
|
|
||||||
all: check_env $(PLUGIN_NAME).so
|
all: check_env $(PLUGIN_NAME).so
|
||||||
|
@ -22,12 +34,13 @@ install: all
|
||||||
cp $(PLUGIN_NAME).so ${HOME}/.local/share/hyprload/plugins/bin
|
cp $(PLUGIN_NAME).so ${HOME}/.local/share/hyprload/plugins/bin
|
||||||
|
|
||||||
check_env:
|
check_env:
|
||||||
ifndef HYPRLAND_HEADERS
|
@if [ -z "${HYPRLAND_HEADERS}" ]; then \
|
||||||
$(error HYPRLAND_HEADERS is undefined! Please set it to the path to the root of the configured Hyprland repo)
|
echo "HYPRLAND_HEADERS not set. Please set it to the root of the hl repo directory."; \
|
||||||
endif
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
$(PLUGIN_NAME).so: $(SOURCE_FILES) $(INCLUDE_FILES)
|
$(PLUGIN_NAME).so: $(SOURCE_FILES) $(INCLUDE_FILES)
|
||||||
g++ -shared $(COMPILE_FLAGS) $(SOURCE_FILES) -o $(PLUGIN_NAME).so
|
g++ -shared $(COMPILE_FLAGS) $(COMPILE_DEFINES) $(SOURCE_FILES) -o $(PLUGIN_NAME).so
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ./$(PLUGIN_NAME).so
|
rm -f ./$(PLUGIN_NAME).so
|
||||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -1,13 +1,11 @@
|
||||||
#define WLR_USE_UNSTABLE
|
#include <src/helpers/Color.hpp>
|
||||||
#include "src/helpers/Color.hpp"
|
#include <src/managers/KeybindManager.hpp>
|
||||||
#include "src/managers/KeybindManager.hpp"
|
|
||||||
|
|
||||||
#include "globals.hpp"
|
|
||||||
|
|
||||||
#include <src/Compositor.hpp>
|
#include <src/Compositor.hpp>
|
||||||
#include <src/config/ConfigManager.hpp>
|
#include <src/config/ConfigManager.hpp>
|
||||||
#include <src/helpers/Workspace.hpp>
|
#include <src/helpers/Workspace.hpp>
|
||||||
|
|
||||||
|
#include "globals.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
Loading…
Add table
Reference in a new issue