From 62115ccccc210ca1de7accba502ad17c3013020e Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 14 Oct 2014 09:45:26 +0200 Subject: [PATCH] Handle relative CMAKE_INSTALL_LIBDIR during plugin loading --- src/libtomahawk/utils/PluginLoader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libtomahawk/utils/PluginLoader.cpp b/src/libtomahawk/utils/PluginLoader.cpp index 60c50f6d3..0eeccd932 100644 --- a/src/libtomahawk/utils/PluginLoader.cpp +++ b/src/libtomahawk/utils/PluginLoader.cpp @@ -119,6 +119,13 @@ PluginLoader::pluginDirs() #endif QDir installLibDir( CMAKE_INSTALL_LIBDIR ); + // In the case where CMAKE_INSTALL_LIBDIR is given relatively, we must + // add the install prefix to it. + if ( installLibDir.isRelative() ) + { + installLibDir = QDir( CMAKE_INSTALL_PREFIX ); + installLibDir.cd( CMAKE_INSTALL_LIBDIR ); + } QDir libDir( appDir ); libDir.cdUp();