KPixmapProvider is not available anymore once this is set.
By setting -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054200 for the build of the lib, you effectively disable KCOMPLETION_ENABLE_DEPRECATED_SINCE(5, 66), and thus hide this class from any builds. Which makes kdelibs4support fail e.g., cmp. https://build.kde.org/job/Frameworks/job/kdelibs4support/job/kf5-qt5%20SUSEQt5.12/86/
You need to also add add_definitions(-DKCOMPLETION_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054100) to still see KPixmapProvider all the time when building this lib, as this override the group settings from the KF variant.