Skip to content

Fix CMake configs loading from arch-specific app-libdir

twb twb requested to merge tinywrkb/flatpak-kde-runtime:qt62_cmake_inc into qt6.2

I believe that this should solve the issue, though I haven't built the runtime to test. edit: tested and confirmed working after building the runtime
The first added line with /app/lib/cmake is not really needed, but if we're already adding the arch-specific libdir, then it doesn't hurt to have the generic one also in.

The following is also in the commit message.

CMake does not include /app/lib/ARCH-linux-gnu/cmake in its search path for configs, and due to this, find_package is failing to locate packages.

This is affecting Flatpak apps that package Qt6 modules, as these modules are installed by default into the arch-specific libdir (e.g. /app/lib/x86_64-linux-gnu/cmake). The issue forces Flatpak app maintainers to manually set _qt_additional_packages_prefix_paths.

This workaround explicitly adds /app/lib/${CMAKE_CXX_LIBRARY_ARCHITECTURE}/cmake to find_package's search path.

Closes #29 (closed).

Edited by twb twb

Merge request reports