DevHeads.net

/: Revert "Fix plugins lookup when not building in the Qt prefix"

Git commit c8b445b04a0efe66e491a6f0a06ca4ef312fdc91 by Ben Cooksley.
Committed on 09/08/2014 at 12:00.
Pushed by bcooksley into branch 'master'.

Revert "Fix plugins lookup when not building in the Qt prefix"

This reverts commit 38e0665127650b3db5676c1dd5f0ffeb8cdb176f.

This change is incorrect, as Qt/QCA does not look within $pluginDir/qca/crypto when loading it's plugins.
Instead, it expects to find them within the $pluginDir/crypto/ subdirectory which no longer exists with this change.

While the use of lib/qca/ is non-standard for plugins, existing code within the CI scripts is able to handle this abnormality.
Normal Qt libraries which use plugins also function normally on the CI system.

The change as it stands does not work with Qt 4 and breaks all tests which are reliant upon QCA on the CI system.
As it appears a decision needs to be made on where QCA plugins should live and how they should be loaded i'm reverting this change to allow the tests to pass again.

CCMAIL: <a href="mailto: ... at kde dot org"> ... at kde dot org</a>
CCMAIL: <a href="mailto: ... at land dot ru"> ... at land dot ru</a>
CCMAIL: <a href="mailto: ... at mankowski dot fr"> ... at mankowski dot fr</a>
CCMAIL: <a href="mailto:kde-core- ... at kde dot org">kde-core- ... at kde dot org</a>
CCMAIL: <a href="mailto:kde-frameworks- ... at kde dot org">kde-frameworks- ... at kde dot org</a>

M +1 -1 CMakeLists.txt

<a href="http://commits.kde.org/qca/c8b445b04a0efe66e491a6f0a06ca4ef312fdc91" title="http://commits.kde.org/qca/c8b445b04a0efe66e491a6f0a06ca4ef312fdc91">http://commits.kde.org/qca/c8b445b04a0efe66e491a6f0a06ca4ef312fdc91</a>

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4dc6de..24d8ab3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,7 +158,7 @@ else( QCA_INSTALL_IN_QT_PREFIX )
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "Directory where lib will install")

set(QCA_PREFIX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Directory where qca will install")
- set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/plugins/${QCA_LIB_NAME}/crypto" CACHE PATH "Directory where qca plugins will install")
+ set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}/crypto" CACHE PATH "Directory where qca plugins will install")
set(QCA_BINARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Directory where qca plugins will install")
set(QCA_LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}" CACHE PATH "Directory where qca library will install")
set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install")

Comments

Re: /: Revert "Fix plugins lookup when not building in the

By Aleix Pol at 08/09/2014 - 09:40

My bad, I didn't try on Qt4, only assumed it would be the same as Qt5.

Either way, this breaks Qt5 now.

Aleix

Re: /: Revert "Fix plugins lookup when not building in the

By Ben Cooksley at 08/09/2014 - 09:44

On Sun, Aug 10, 2014 at 2:40 AM, Aleix Pol < ... at kde dot org> wrote:
I suspect it will be broken on Qt 5 as well, unless it looks in
qca/crypto for it's plugins.
There are two fixes I can see here:

1) Change the install directory to $prefix/lib/plugins/crypto
2) Change the QCA plugin loading code to look in qca/crypto/ instead of crypto/

Thanks,
Ben