diff options
author | stephan-cr <[email protected]> | 2023-03-14 22:50:30 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-03-14 21:50:30 +0000 |
commit | e4b6af41e5b3f4641dc1e1142e97ed708f451363 (patch) | |
tree | 7d060dcdd5e5bec5c33d362bc6d0ae9df4d53c75 /Makefile | |
parent | d63e8c8f45202f1189f78e6c5eaa7e23f7239712 (diff) | |
download | Hyprland-e4b6af41e5b3f4641dc1e1142e97ed708f451363.tar.gz Hyprland-e4b6af41e5b3f4641dc1e1142e97ed708f451363.zip |
Refactor CMake and Make file (#1766)
* Refactor CMake and Make file
- modernize CMake a bit
- "unscreamify" CMake commands
- replace undocumented CMake option -H by -S in Makefile
- remove unnecessary "cd" in Makefile
* Fix include path to wlroots generated header files
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 22 insertions, 22 deletions
@@ -142,19 +142,19 @@ text-input-unstable-v1-protocol.c: text-input-unstable-v1-protocol.o: text-input-unstable-v1-protocol.h legacyrenderer: - mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DLEGACY_RENDERER:STRING=true -H./ -B./build -G Ninja + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DLEGACY_RENDERER:BOOL=true -S . -B ./build -G Ninja cmake --build ./build --config Release --target all -j$(shell nproc) legacyrendererdebug: - mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DLEGACY_RENDERER:STRING=true -H./ -B./build -G Ninja + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DLEGACY_RENDERER:BOOL=true -S . -B ./build -G Ninja cmake --build ./build --config Release --target all -j$(shell nproc) release: - mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build -G Ninja cmake --build ./build --config Release --target all -j$(shell nproc) debug: - mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -H./ -B./build -G Ninja + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -S . -B ./build -G Ninja cmake --build ./build --config Debug --target all -j$(shell nproc) clear: @@ -166,20 +166,20 @@ clear: all: make clear make fixwlr - cd ./subprojects/wlroots && meson build/ --buildtype=release && ninja -C build/ && cp ./build/libwlroots.so.12032 ${PREFIX}/lib/ || echo "Could not install libwlroots to ${PREFIX}/lib/libwlroots.so.12032" && cd ../.. - cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) + cd ./subprojects/wlroots && meson setup build/ --buildtype=release && ninja -C build/ && cp ./build/libwlroots.so.12032 ${PREFIX}/lib/ || echo "Could not install libwlroots to ${PREFIX}/lib/libwlroots.so.12032" + cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) make protocols make release - cd hyprctl && make all && cd .. + make -C hyprctl all install: make clear make fixwlr - cd ./subprojects/wlroots && meson build/ --buildtype=release && ninja -C build/ && cp ./build/libwlroots.so.12032 ${PREFIX}/lib/ || echo "Could not install libwlroots to ${PREFIX}/lib/libwlroots.so.12032" && cd ../.. - cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) && cd ../.. + cd ./subprojects/wlroots && meson setup build/ --buildtype=release && ninja -C build/ && cp ./build/libwlroots.so.12032 ${PREFIX}/lib/ || echo "Could not install libwlroots to ${PREFIX}/lib/libwlroots.so.12032" + cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) && cd ../.. make protocols make release - cd hyprctl && make all && cd .. + make -C hyprctl all mkdir -p ${PREFIX}/share/wayland-sessions mkdir -p ${PREFIX}/bin @@ -218,32 +218,32 @@ config: make fixwlr - cd subprojects/wlroots && meson ./build --prefix=${PREFIX} --buildtype=release -Dwerror=false -Dexamples=false - cd subprojects/wlroots && ninja -C build/ + meson setup subprojects/wlroots/build subprojects/wlroots --prefix=${PREFIX} --buildtype=release -Dwerror=false -Dexamples=false + ninja -C subprojects/wlroots/build/ - cd subprojects/wlroots && ninja -C build/ install + ninja -C subprojects/wlroots/build/ install - cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) + cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) pluginenv: make protocols - cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) - + cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) + make fixwlr - - cd subprojects/wlroots && meson ./build --prefix=${PREFIX} --buildtype=release -Dwerror=false -Dexamples=false - cd subprojects/wlroots && ninja -C build/ + + meson setup subprojects/wlroots/build subprojects/wlroots --prefix=${PREFIX} --buildtype=release -Dwerror=false -Dexamples=false + ninja -C subprojects/wlroots/build/ configdebug: make protocols make fixwlr - cd subprojects/wlroots && meson ./build --prefix=${PREFIX} --buildtype=debug -Dwerror=false -Dexamples=false -Db_sanitize=address - cd subprojects/wlroots && ninja -C build/ + meson setup subprojects/wlroots/build subprojects/wlroots --prefix=${PREFIX} --buildtype=debug -Dwerror=false -Dexamples=false -Db_sanitize=address + ninja -C subprojects/wlroots/build/ - cd subprojects/wlroots && ninja -C build/ install + ninja -C subprojects/wlroots/build/ install man: pandoc ./docs/Hyprland.1.rst \ |