Build: Only set variable if module exists
@@ -55,9 +55,12 @@ if (INSTALL_SYSTEM_FILES)
set (FISH_COMPLETION_COMPLETIONSDIR "/usr/share/fish/vendor_completions.d")
find_package (PkgConfig)
if (PKG_CONFIG_FOUND)
+ pkg_check_modules (FISH_FOUND fish QUIET)
+ if (FISH_FOUND)
include (LibFindMacros)
pkg_get_variable (FISH_COMPLETION_COMPLETIONSDIR fish completionsdir)
endif ()
+ endif ()
install (FILES kdb.fish
DESTINATION ${FISH_COMPLETION_COMPLETIONSDIR})
