summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-10-28 14:02:03 +0100
committerPřemysl Eric Janouch <p@janouch.name>2020-10-28 17:17:34 +0100
commit03ed0973531708d855da1129f54ee6b3f933b0af (patch)
tree1212c0d9ca0a6f921d067e00dcfa01409d9b485f /CMakeLists.txt
parentb68e5ceedc3bc126ac94617053efd184dc5658a5 (diff)
downloadxK-03ed0973531708d855da1129f54ee6b3f933b0af.tar.gz
xK-03ed0973531708d855da1129f54ee6b3f933b0af.tar.xz
xK-03ed0973531708d855da1129f54ee6b3f933b0af.zip
ZyklonB: use XDG paths by default
Install plugins to /usr/share rather than /usr/lib since they're arch-independent. Many precedents can be found for scripted plugins in /usr/share and fewer for /usr/lib. Look for plugins in all XDG data directories and repurpose the "plugin_dir" setting to override this behaviour. This adds some complexity to the bot but unifies the project. It might make sense to remove the "plugin_dir" setting.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 2 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ee87ab..7da0cd8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -132,8 +132,6 @@ set (HAVE_EDITLINE "${WANT_LIBEDIT}")
set (HAVE_LUA "${WITH_LUA}")
include (GNUInstallDirs)
-# ZyklonB is currently an odd duck but degesch follows normal XDG rules
-set (zyklonb_plugin_dir ${CMAKE_INSTALL_LIBDIR}/zyklonb/plugins)
configure_file (${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_BINARY_DIR}/config.h)
include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR})
@@ -187,8 +185,9 @@ add_custom_target (clang-tidy
# Installation
install (TARGETS zyklonb degesch kike DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
+# XXX: our defaults for XDG_DATA_DIRS expect /usr/local/shore or /usr/share
install (DIRECTORY plugins/zyklonb/
- DESTINATION ${zyklonb_plugin_dir} USE_SOURCE_PERMISSIONS)
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/zyklonb/plugins USE_SOURCE_PERMISSIONS)
install (DIRECTORY plugins/degesch/
DESTINATION ${CMAKE_INSTALL_DATADIR}/degesch/plugins)