Need help building Avogadro2 (Target "avogadro" links to target "Qt5::OpenGL" but the target was...)

Hello, it me again.

I am trying to build Avogadro2 for Tumbleweed with Science repo. I use Science repo because some dependency like molequeue is not in factory yet.

I got stuck with

 CMake Error at avogadro/CMakeLists.txt:99 (add_executable):
    6s]   Target "avogadro" links to target "Qt5::OpenGL" but the target was not
    6s]   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    6s]   an ALIAS target is missing?

I assume that it is missing Qt5OpenGL.
So I tried adding

BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-qttools-devel
BuildRequires:  libQt5OpenGL-devel
BuildRequires:  libQt5OpenGL5

But it does not fix the issue.

So I’m not sure what cause this error.


I believe that the Avogadro is looking for Qt5OpenGL but not the same place that Qt5OpenGL was installed. Maybe I have to add some kind of flag to tell avogadro where to look.