mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 10:20:12 +01:00
Enabling subprojects to get hyprland to compile
On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install-scripts/hyprland.sh
This commit is contained in:
parent
f776563d3e
commit
64754089d4
@ -84,12 +84,27 @@ if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then
|
|||||||
echo "${NOTE} Hyprland compile patch does not apply on $tag; skipping."
|
echo "${NOTE} Hyprland compile patch does not apply on $tag; skipping."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Prefer /usr/local when resolving pkg-config and CMake prefixes
|
# By default, build Hyprland with bundled hyprutils/hyprlang to avoid version mismatches
|
||||||
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}"
|
# You can force system libs by exporting USE_SYSTEM_HYPRLIBS=1 before running this script.
|
||||||
export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}"
|
USE_SYSTEM=${USE_SYSTEM_HYPRLIBS:-0}
|
||||||
CXX=clang++ CXXFLAGS=-std=gnu++26 make all
|
if [ "$USE_SYSTEM" = "1" ]; then
|
||||||
|
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}"
|
||||||
|
export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}"
|
||||||
|
SYSTEM_FLAGS=("-DUSE_SYSTEM_HYPRUTILS=ON" "-DUSE_SYSTEM_HYPRLANG=ON")
|
||||||
|
else
|
||||||
|
# Ensure we do not accidentally pick up mismatched system headers
|
||||||
|
unset PKG_CONFIG_PATH || true
|
||||||
|
SYSTEM_FLAGS=("-DUSE_SYSTEM_HYPRUTILS=OFF" "-DUSE_SYSTEM_HYPRLANG=OFF")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make sure submodules are present when building bundled deps
|
||||||
|
git submodule update --init --recursive || true
|
||||||
|
|
||||||
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release "${SYSTEM_FLAGS[@]}"
|
||||||
|
cmake --build build -j "$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)"
|
||||||
|
|
||||||
if [ $DO_INSTALL -eq 1 ]; then
|
if [ $DO_INSTALL -eq 1 ]; then
|
||||||
if sudo make install 2>&1 | tee -a "$MLOG"; then
|
if sudo cmake --install build 2>&1 | tee -a "$MLOG"; then
|
||||||
printf "${OK} ${MAGENTA}Hyprland tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
printf "${OK} ${MAGENTA}Hyprland tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
||||||
else
|
else
|
||||||
echo -e "${ERROR} Installation failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$MLOG"
|
echo -e "${ERROR} Installation failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$MLOG"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user