Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Add cmake install target

Open theoparis opened this issue 1 year ago • 5 comments

Description

Currently it seems like the makefile is used for the install target even though ninja is used via cmake in the makefile. I think it would make more sense to add a cmake install target so that you can do this:

cmake -B build -G Ninja
cmake --build build
sudo cmake --install build

This would also benefit the use case of customizing cmake features such as -DNO_XWAYLAND=ON or -DCMAKE_BUILD_TYPE=MinSizeRel without having to modify the makefile. This also impacts setting custom compilers and/or compiler flags.

theoparis avatar Mar 04 '24 06:03 theoparis

the problem is install isn't that easy, as we for example use cpio which I don't think cmake has an equivalent.

vaxerski avatar Mar 04 '24 11:03 vaxerski

I guess this is about the installheaders. @vaxerski what you're trying to do with cpio? Keep symlinks? I'm pretty sure cmake has such options in at least some commands, might take a look

cnt0 avatar Apr 09 '24 16:04 cnt0

feel free to MR

vaxerski avatar Apr 09 '24 22:04 vaxerski

I've worked on porting most of the stuff from the Makefile to CMake, and it works fine, except in the Nix build, where CMake seems to build Hyprland twice for some reason. https://github.com/hyprwm/Hyprland/tree/cmake

fufexan avatar Apr 10 '24 06:04 fufexan

https://github.com/hyprwm/Hyprland/pull/5667 please test this.

fufexan avatar Apr 21 '24 20:04 fufexan