Use the same library search path as the install path on Unix platforms (#1412)
Some distributions use `lib64` for shared libraries. This breaks the plugin search logic. Added a `-D` define to use the same path as is configured by CMake.
This commit is contained in:
parent
6d9a970543
commit
bdf84b7cfa
@ -636,6 +636,10 @@ if(WIN32 OR OS2)
|
|||||||
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
install(TARGETS rssguard DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(TARGETS rssguard DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
target_compile_definitions(rssguard
|
||||||
|
PRIVATE
|
||||||
|
RSSGUARD_LIBDIR="${CMAKE_INSTALL_LIBDIR}"
|
||||||
|
)
|
||||||
set(HEADERS_FOLDER "${CMAKE_INSTALL_INCLUDEDIR}/librssguard")
|
set(HEADERS_FOLDER "${CMAKE_INSTALL_INCLUDEDIR}/librssguard")
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
install(TARGETS rssguard DESTINATION Contents/MacOS)
|
install(TARGETS rssguard DESTINATION Contents/MacOS)
|
||||||
|
@ -29,6 +29,7 @@ QList<ServiceEntryPoint*> PluginFactory::loadPlugins() const {
|
|||||||
QDirIterator::IteratorFlag::NoIteratorFlags);
|
QDirIterator::IteratorFlag::NoIteratorFlags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
qDebugNN << LOGSEC_CORE << "Checking for plugins in " << plugin_folder;
|
||||||
while (dir_iter.hasNext()) {
|
while (dir_iter.hasNext()) {
|
||||||
dir_iter.next();
|
dir_iter.next();
|
||||||
|
|
||||||
@ -63,8 +64,8 @@ QList<ServiceEntryPoint*> PluginFactory::loadPlugins() const {
|
|||||||
QStringList PluginFactory::pluginPaths() const {
|
QStringList PluginFactory::pluginPaths() const {
|
||||||
QStringList paths;
|
QStringList paths;
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("..") + QDir::separator() + QL1S("lib") +
|
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("..") + QDir::separator() +
|
||||||
QDir::separator() + QL1S(APP_LOW_NAME);
|
QL1S(RSSGUARD_LIBDIR) + QDir::separator() + QL1S(APP_LOW_NAME);
|
||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("plugins");
|
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("plugins");
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user