With Qt5 (5.1.0 from qt overlay) a cmake based project can find the right Qt version (if Qt5 and Qt4 is installed) and can compile and link basic code. But the build fails, when I use ui files (Qt Designer files) in my Qt5 project. Looks like cmake then uses the wrong uic binary (/usr/bin/uic instead of /usr/lib64/qt5/bin/uic). Therefor it generates code with an QtCore/QAction include instead of the right QtWidgets/QAction include and the compile fails. Maybe similar applies for other Qt executables (rcc, moc, ...). Reproducible: Always
Attach the cmake files installed by qtwidgets please
Created attachment 353202 [details] Qt5WidgetsConfig.cmake 1 of 4 cmake files installed by QtWidgets into /usr/lib64/cmake/Qt5Widgets/
Created attachment 353204 [details] Qt5WidgetsConfigExtras.cmake 2 of 4 cmake files installed by QtWidgets into /usr/lib64/cmake/Qt5Widgets/
Created attachment 353206 [details] Qt5WidgetsConfigVersion.cmake 3 of 4 cmake files installed by QtWidgets into /usr/lib64/cmake/Qt5Widgets/
Created attachment 353208 [details] Qt5WidgetsMacros.cmake 4 of 4 cmake files installed by QtWidgets into /usr/lib64/cmake/Qt5Widgets/
Created attachment 353210 [details] List of files installed by QtWidgets (equery f qtwidgets output)
In the second file you attached there's set(imported_location "${_qt5Widgets_install_prefix}/lib64/qt5/bin/uic") so the path looks good to me. Can you attach a testcase that reproduces the failure please?
Sorry guys. It turned out that there was an error in my makefile. I had forgotten to call find_package(Qt5Widgets), but the error message has put me on the wrong track. Thank you for your efforts!