Install zsh completion files using new KDE_INSTALL_ZSHAUTOCOMPLETEDIR variable from ECM

Note: it uses the new variable KDE_INSTALL_ZSHAUTOCOMPLETEDIR, which is
to be added in ECM 5.101.

Read more: https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/310
This commit is contained in:
ivan tkachenko 2022-11-13 00:46:06 +03:00
parent 1fbbeb823d
commit 232ed339c2
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3
2 changed files with 1 additions and 5 deletions

View file

@ -120,10 +120,6 @@ if (WIN32)
add_compile_definitions(WIN_SDK_VERSION=${WIN_SDK_VERSION})
endif()
if (NOT ZSH_AUTOCOMPLETE_DIR)
set(ZSH_AUTOCOMPLETE_DIR "${KDE_INSTALL_DATADIR}/zsh/site-functions")
endif()
add_subdirectory(core)
add_subdirectory(plugins)
add_subdirectory(interfaces)

View file

@ -12,4 +12,4 @@ target_link_libraries(kdeconnect-cli
)
install(TARGETS kdeconnect-cli ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES kdeconnect.zsh RENAME _kdeconnect DESTINATION ${ZSH_AUTOCOMPLETE_DIR})
install(FILES kdeconnect.zsh RENAME _kdeconnect DESTINATION ${KDE_INSTALL_ZSHAUTOCOMPLETEDIR})