Browse Source

Install Zsh completion.

main
tastytea 1 year ago
parent
commit
91373abfc5
Signed by: tastytea GPG Key ID: CFC39497F1B26E07
  1. 8
      CMakeLists.txt
  2. 1
      completions/CMakeLists.txt

8
CMakeLists.txt

@ -8,7 +8,6 @@ endif()
# Global build options.
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
option(BUILD_SHARED_LIBS "Build shared libraries." YES)
project (mastorss
VERSION 0.13.0
@ -19,6 +18,9 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
# Project build options.
option(WITH_MAN "Compile and install manpage." YES)
option(WITH_COMPLETIONS "Install Zsh completions." YES)
set(ZSH_COMPLETION_DIR "share/zsh/site-functions"
CACHE STRING "Installation directory for Zsh completions.")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@ -34,6 +36,10 @@ if(WITH_MAN)
add_subdirectory(man)
endif()
if(WITH_COMPLETIONS)
add_subdirectory(completions)
endif()
install(FILES watchwords.json
DESTINATION "${CMAKE_INSTALL_DATADIR}/mastorss")

1
completions/CMakeLists.txt

@ -0,0 +1 @@
install(FILES "_mastorss" DESTINATION "${ZSH_COMPLETION_DIR}")
Loading…
Cancel
Save