Changing plugins install path

David Faure faure at kde.org
Tue Sep 4 18:12:45 UTC 2012


Hi (Alex, especially)

I am about to push this change, please review.

commit dc36248965b4e04065401abd7f8ecc15f3a13be7
Author: David Faure <faure at kde.org>
Date:   Thu Aug 30 20:01:43 2012 +0200

    Move kde plugins from %lib/kde5 to %lib/plugins/kf5
    
    And qt plugins from %lib/kde5/plugins to %lib/plugins.
    This way we have all plugins in the same dir, and that dir conforms
    to the xdg discussion last year. It will also make it easier to use
    the same framework for loading both, later on.
    
    However this means a SIC in cmake vars: installing qt plugins must be
    done with QT_PLUGIN_INSTALL_DIR rather than PLUGIN_INSTALL_DIR/plugins
    (which, on hindsight, was a nasty hardcoded path...).

[...]

The change to ECM looks like this:

diff --git a/kde-modules/KDEInstallDirs.cmake b/kde-modules/KDEInstallDirs.cmake
index 208c60c..c340d0d 100644
--- a/kde-modules/KDEInstallDirs.cmake
+++ b/kde-modules/KDEInstallDirs.cmake
@@ -17,7 +17,7 @@
 #  KCFG_INSTALL_DIR         - the directory where kconfig files will be installed
 #  LOCALE_INSTALL_DIR       - the directory where translations will be installed
 #  MAN_INSTALL_DIR          - the directory where man pages will be installed (default prefix/man/)
-#  PLUGIN_INSTALL_DIR       - the subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde5)
+#  PLUGIN_INSTALL_DIR       - the subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/plugins/kf5)
 #  IMPORTS_INSTALL_DIR      - the subdirectory relative to the install prefix where imports will be installed
 #  SERVICES_INSTALL_DIR     - the directory where service (desktop, protocol, ...) files will be installed
 #  SERVICETYPES_INSTALL_DIR - the directory where servicestypes desktop files will be installed
@@ -129,7 +129,8 @@ else()
 endif()
 _set_fancy(INCLUDE_INSTALL_DIR       "include"                                     "The install dir for header files")
 
-_set_fancy(PLUGIN_INSTALL_DIR        "${LIB_INSTALL_DIR}/kde5"                     "The install dir where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde5)")
+_set_fancy(QT_PLUGIN_INSTALL_DIR     "${LIB_INSTALL_DIR}/plugins"                  "The install dir where Qt plugins will be installed (default is ${LIB_INSTALL_DIR}/plugins)")
+_set_fancy(PLUGIN_INSTALL_DIR        "${QT_PLUGIN_INSTALL_DIR}/kf5"                "The install dir where plugins (loaded via KPluginLoader) will be installed (default is ${LIB_INSTALL_DIR}/plugins/kf5)")
 _set_fancy(IMPORTS_INSTALL_DIR       "${PLUGIN_INSTALL_DIR}/imports"               "The install dir where imports will be installed")
 _set_fancy(CMAKECONFIG_INSTALL_PREFIX "${LIB_INSTALL_DIR}/cmake"                   "The prefix under which packages will create their own subdirectory for their CMake configuration files")
 _set_fancy(DATA_INSTALL_DIR          "${SHARE_INSTALL_PREFIX}"                     "The parent directory where applications can install their data")

The changes in kdelibs look like this:

diff --git a/kdewidgets/CMakeLists.txt b/kdewidgets/CMakeLists.txt
index 37eaef8..099dcaa 100644
--- a/kdewidgets/CMakeLists.txt
+++ b/kdewidgets/CMakeLists.txt
@@ -64,7 +64,7 @@ if(QT_QTDESIGNER_FOUND)
                          )
   endif(NOT WIN32)
 
-  install(TARGETS kdewidgets  DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer )
+  install(TARGETS kdewidgets  DESTINATION ${QT_PLUGIN_INSTALL_DIR}/designer )
 
   # deprecated widgets
   if(NOT KDE_NO_DEPRECATED)

and a few more like this. Plus updating kstandarddirs and kpluginloader, obviously.

Any objections to this change?

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5



More information about the Kde-buildsystem mailing list