aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Lohnau <alexander.lohnau@gmx.de>2021-06-12 09:34:51 +0000
committerAlexander Lohnau <alexander.lohnau@gmx.de>2021-06-12 09:34:51 +0000
commitad947cd415d388d2013ab076563a502240be9937 (patch)
tree9791abe7db121d366f729929bdb04024087968e4
parent170db9bb2edc692b70d3267faee7c5b23ae63bb1 (diff)
downloadextra-cmake-modules-ad947cd415d388d2013ab076563a502240be9937.tar.gz
extra-cmake-modules-ad947cd415d388d2013ab076563a502240be9937.tar.bz2
Add prefix.sh.fish file for fish shell
-rw-r--r--kde-modules/KDEInstallDirs.cmake4
-rw-r--r--kde-modules/prefix.sh.fish.cmake22
2 files changed, 26 insertions, 0 deletions
diff --git a/kde-modules/KDEInstallDirs.cmake b/kde-modules/KDEInstallDirs.cmake
index db987f23..5b11a424 100644
--- a/kde-modules/KDEInstallDirs.cmake
+++ b/kde-modules/KDEInstallDirs.cmake
@@ -722,6 +722,10 @@ endif()
# Prefix set up
configure_file(${CMAKE_CURRENT_LIST_DIR}/prefix.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/prefix.sh @ONLY)
+find_program(FISH_EXECUTABLE fish)
+if(FISH_EXECUTABLE)
+ configure_file(${CMAKE_CURRENT_LIST_DIR}/prefix.sh.fish.cmake ${CMAKE_CURRENT_BINARY_DIR}/prefix.sh.fish @ONLY)
+endif()
option(KDE_INSTALL_PREFIX_SCRIPT "Installs ${CMAKE_INSTALL_PREFIX}/prefix.sh that sets up the necessary environment variables" OFF)
if(KDE_INSTALL_PREFIX_SCRIPT)
diff --git a/kde-modules/prefix.sh.fish.cmake b/kde-modules/prefix.sh.fish.cmake
new file mode 100644
index 00000000..435d6c61
--- /dev/null
+++ b/kde-modules/prefix.sh.fish.cmake
@@ -0,0 +1,22 @@
+# SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.lohnau@gmx.de>
+# SPDX-License-Identifier: BSD-3-Clause
+
+set PATH "@KDE_INSTALL_FULL_BINDIR@:$PATH"
+
+# LD_LIBRARY_PATH only needed if you are building without rpath
+# set -x LD_LIBRARY_PATH "@KDE_INSTALL_FULL_LIBDIR@:$LD_LIBRARY_PATH"
+
+if set -q XDG_DATA_DIRS
+ set -x --path XDG_DATA_DIRS /usr/local/share/ /usr/share/
+end
+set -x --path XDG_DATA_DIRS "@KDE_INSTALL_FULL_DATADIR@" $XDG_DATA_DIRS
+
+if set -q XDG_CONFIG_DIRS
+ set -x --path XDG_CONFIG_DIRS /etc/xdg
+end
+set -x --path XDG_CONFIG_DIRS "@KDE_INSTALL_FULL_CONFDIR@" $XDG_CONFIG_DIRS
+
+set -x --path QT_PLUGIN_PATH "@KDE_INSTALL_FULL_QTPLUGINDIR@" $QT_PLUGIN_PATH
+set -x --path QML2_IMPORT_PATH "@KDE_INSTALL_FULL_QMLDIR@" $QML2_IMPORT_PATH
+
+set -x --path QT_QUICK_CONTROLS_STYLE_PATH "@KDE_INSTALL_FULL_QMLDIR@/QtQuick/Controls.2/" $QT_QUICK_CONTROLS_STYLE_PATH