SUMMARY When passing -DBUILD_SHARED_LIBS=OFF argument to CMake at configuration step, CMake fails with following error: CMake Error: install(EXPORT "KF6WidgetsAddonsTargets" ...) includes target "KF6WidgetsAddons" which requires target "KF6WidgetsAddons_resources_1" that is not in any export set. STEPS TO REPRODUCE 1. Try to build KWidgetsAddons with -DBUILD_SHARED_LIBS=OFF OBSERVED RESULT CMake configuration fails. EXPECTED RESULT CMake configuration succeeds. SOFTWARE/OS VERSIONS Linux: Fedora 39 KDE Frameworks Version: 6.0 Qt Version: 6.6.2 ADDITIONAL INFORMATION It looks like the issue is triggered by qt_add_resources call: https://invent.kde.org/frameworks/kwidgetsaddons/-/blob/v6.0.0/src/CMakeLists.txt?ref_type=tags#L324 So it could be Qt bug.
Created attachment 172075 [details] Possible fix for KWidgetsAddons I think I found a way to make it work. The problem is that when building static library qt_add_resources adds separate targets for resources that need to be installed. Unfortunately it needs to be done for every use of qt_add_resources, in all libraries. I attached a patch that seems to fix the issue for KWidgetsAddons.