How to prepend CMAKE_LIBRARY_OUTPUT_DIRECTORY to QCoreApplication::libraryPaths() ?

Elvis Angelaccio elvis.angelaccio at
Sun Mar 11 11:08:27 UTC 2018

I have a weird crash in ark if I enable the target generation in the bin 
subfolder [1].
The problem is that QCoreApplication::libraryPaths() returns the following 

    ark.kerfuffle: ("/usr/lib/qt/plugins", 

which means that ark loads first its system-wide plugins, while it should 
load first the plugins form its build dir.

ECM has code that fixes this problem for test targets [2]. 
I tried to do the same to all the ark targets (main executable, kerfuffle 
library, plugins), but it doesn't work. 
Commit message in [2] by David says:

    "This of course requires running the unittests via ctest rather than 
launching the executable directly."

Does that mean that ctest has some magic that adjusts the library paths?
Is it possible to do the same with normal executables?



More information about the Kde-buildsystem mailing list