CMake: install files (instead of Makefile)

This commit is contained in:
Mihai Fufezan
2024-04-21 19:56:46 +03:00
parent 03ebad3cbf
commit 99aa34db6e
5 changed files with 105 additions and 63 deletions

View File

@@ -5,4 +5,17 @@ project(
DESCRIPTION "Control utility for Hyprland"
)
add_executable(hyprctl "main.cpp")
add_executable(hyprctl "main.cpp")
# binary
install(TARGETS hyprctl)
# shell completions
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprctl.bash
DESTINATION ${CMAKE_INSTALL_DATADIR}/bash-completion/completions
RENAME hyprctl)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprctl.fish
DESTINATION ${CMAKE_INSTALL_DATADIR}/fish/vendor_completions.d)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprctl.zsh
DESTINATION ${CMAKE_INSTALL_DATADIR}/zsh/site-functions
RENAME _hyprctl)