Skip to content

Define relative paths when KDE_INSTALL_USE_QT_SYS_PATHS is enabled and CMAKE_INSTALL_PREFIX matches the Qt install prefix

When building multiple KDE projects, installing them to "$DESTDIR" and having cmake look for kde dependencies in "$DESTDIR" using "CMAKE_PREFIX_PATH=$DESTDIR/usr", we currently get failures when calling find_package() on projects that use KDE_INSTALL_QTPLUGINDIR, KDE_INSTALL_QTQMLDIR or KDE_INSTALL_QTQUICKIMPORTSDIR because these are defined as absolute paths when KDE_INSTALL_USE_QT_SYS_PATHS is enabled.

This commit defines these paths relative to qmake's QT_INSTALL_PREFIX property instead. This fixes DESTDIR installations because with relative paths, CMake will search for these paths in "$DESTDIR" as well as "/".

Edited by Daan De Meyer

Merge request reports