Use standard GNU install dirs and make them overridable.

This commit is contained in:
Felix Geyer 2013-04-29 22:17:31 +02:00
parent b499a6df77
commit fd18bc0330
5 changed files with 209 additions and 4 deletions

View file

@ -7,6 +7,8 @@
#define KEEPASSX_SOURCE_DIR "${CMAKE_SOURCE_DIR}"
#define KEEPASSX_PLUGIN_DIR "${PLUGIN_INSTALL_DIR}"
#cmakedefine HAVE_PR_SET_DUMPABLE 1
#cmakedefine HAVE_RLIMIT_CORE 1
#cmakedefine HAVE_PT_DENY_ATTACH 1

View file

@ -48,7 +48,15 @@ QString FilePath::pluginPath(const QString& name)
pluginPaths << QCoreApplication::applicationDirPath() + "/../src/autotype/test";
pluginPaths << QCoreApplication::applicationDirPath();
pluginPaths << QCoreApplication::applicationDirPath() + "/../lib/keepassx";
QString systemPluginDir = KEEPASSX_PLUGIN_DIR;
if (systemPluginDir != ".") {
if (!QDir(systemPluginDir).isAbsolute()) {
systemPluginDir = QCoreApplication::applicationDirPath() + "/../" + systemPluginDir;
systemPluginDir = QDir(systemPluginDir).canonicalPath();
}
pluginPaths << systemPluginDir;
}
QStringList dirFilter;
dirFilter << QString("*%1*").arg(name);