Skip to content

Add QT_PLUGIN_PATH to the build environment

KDE's Extra CMake Modules currently use the value of QT_PLUGIN_PATH at configuration time to set it for later test execution. When ctest is run, the value of QT_PLUGIN_PATH at runtime does not actually matter because it was already fixed at CMake configuration time.

What ECM is doing is appending the application's own CMAKE_LIBRARY_OUTPUT_DIRECTORY to the existing QT_PLUGIN_PATH, such that both global and application-specific plugins can be found. However, by doing so it will miss the plugins directory inside of ${kdedir} because that wasn't set at configuration time. Not even activating prefix.sh will make plugin-reliant tests work.

This test failure can be avoided if QT_PLUGIN_PATH at configuration time includes the plugins path inside ${kdedir}. There's already a convenient location inside Module.pm that sets similar paths, an extra line there won't hurt and makes test execution easier.

Edited by Jakob Petsovits

Merge request reports