A workaround to store plugins in a subdirectory

This commit is contained in:
Blue 2024-10-27 19:31:47 +02:00
parent ff9a591d6d
commit 3cc7db8eff
Signed by untrusted user: blue
GPG Key ID: 9B203B252A63EE38
4 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(squawk VERSION 0.2.3 LANGUAGES CXX)
cmake_policy(SET CMP0076 NEW)
@ -211,6 +211,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
target_compile_options(squawk PRIVATE ${COMPILE_OPTIONS})
endif(CMAKE_COMPILER_IS_GNUCXX)
# I am not really sure about this solution
# This should enable plugins to be found in path like /usr/lib/squawk instead of just /usr/lib
set(PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/squawk")
add_compile_definitions(PLUGIN_PATH="${PLUGIN_PATH}")
add_subdirectory(main)
add_subdirectory(core)
add_subdirectory(external/simpleCrypt)

View File

@ -28,7 +28,8 @@ Core::PSE::KWallet::CreateFolder Core::PSE::KWallet::createFolder = 0;
Core::PSE::KWallet::SetFolder Core::PSE::KWallet::setFolder = 0;
Core::PSE::KWallet::SupportState Core::PSE::KWallet::sState = Core::PSE::KWallet::initial;
QLibrary Core::PSE::KWallet::lib("kwalletWrapper");
QLibrary Core::PSE::KWallet::lib(QString("%1/kwalletWrapper").arg(PLUGIN_PATH));
Core::PSE::KWallet::KWallet():
QObject(),

View File

@ -42,10 +42,8 @@
#include "passwordStorageEngines/kwallet.h"
#endif
namespace Core
{
class Squawk : public QObject
{
namespace Core {
class Squawk : public QObject {
Q_OBJECT
public:

View File

@ -50,12 +50,12 @@ Shared::Global* Shared::Global::instance = 0;
const std::set<QString> Shared::Global::supportedImagesExts = {"png", "jpg", "webp", "jpeg", "gif", "svg"};
#ifdef WITH_KIO
QLibrary Shared::Global::openFileManagerWindowJob("openFileManagerWindowJob");
QLibrary Shared::Global::openFileManagerWindowJob(QString("%1/openFileManagerWindowJob").arg(PLUGIN_PATH));
Shared::Global::HighlightInFileManager Shared::Global::hfm = 0;
#endif
#ifdef WITH_KCONFIG
QLibrary Shared::Global::colorSchemeTools("colorSchemeTools");
QLibrary Shared::Global::colorSchemeTools(QString("%1/colorSchemeTools").arg(PLUGIN_PATH));
Shared::Global::CreatePreview Shared::Global::createPreview = 0;
Shared::Global::DeletePreview Shared::Global::deletePreview = 0;
Shared::Global::ColorSchemeName Shared::Global::colorSchemeName = 0;