Qt not found by CMake

I am trying to build my project using OBS. Debian, Ubuntu, Arch, SLE and openSUSE works fine, but Fedora and Centos fail on CMake not finding Qt. The log says, that Qt was installed properly.

I have tried replacing pkgconfig(Qt5Core) with cmake(Qt5) but it made no difference.

Failed log:https://build.opensuse.org/package/live_build_log/home:jdupak/qtrvsim/Fedora_31/x86_64
Spec file: https://build.opensuse.org/package/view_file/home:jdupak/qtrvsim/qtrvsim.spec?expand=1
Project: https://github.com/hollmmax/QtMips

Any idea, what happens there?