Created attachment 922742 [details] Dummy project CMake file Description of problem: The installed CMake config files for the QtGui component are broken. Version-Release number of selected component: At least qt5-qtbase-devel-5.3.1-5.fc20.x86_64, posibly older. How reproducible: Every time. Steps to Reproduce: 1. Create a dummy CMakeLists.txt file in a directory "source": ----------BEGIN CMakeLists.txt-------- cmake_minimum_required(VERSION 2.8.12) project(TestQT5) find_package(Qt5 REQUIRED Gui) ----------END CMakeLists.txt---------- 2. From a seperate build directory, run cmake: $ cd build/ $ /usr/bin/cmake ../source Actual results: $ /usr/bin/cmake ../source ... CMake Error at /usr/lib64/cmake/Qt5Gui/Qt5GuiConfig.cmake:15 (message): The imported target "Qt5::Gui" references the file "Qt5Gui_EGL_LIBRARY-NOTFOUND" but this file does not exist. Possible reasons include: ... -- Configuring incomplete, errors occurred! Expected results: $ /usr/bin/cmake ../source -- The C compiler identification is GNU 4.8.3 -- The CXX compiler identification is GNU 4.8.3 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done Additional info: The underlying problem apears to be that the macros in Qt5GuiConfigExtras.cmake are making some assumptions about the existence of libraries. This can be fixed with a trivial path to check that the libraries were successfully found before attempting to use them: BEGIN PATCH --- /usr/lib64/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake 2014-07-30 17:30:01.956232844 -0400 +++ /usr/lib64/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake.fixed 2014-07-30 17:30:12.348200201 -0400 @@ -23,7 +23,7 @@ set(_Qt5Gui_${_cmake_lib_name}_LIBRARY_DONE TRUE) unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE) list(APPEND Qt5Gui_${Name}_LIBRARIES ${_lib}) - else () + elseif (Qt5Gui_${_cmake_lib_name}_LIBRARY) add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED) set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_${Name}_INCLUDE_DIRS}) END PATCH
Created attachment 922743 [details] Patch to fix the afected Qt5GuiConfigExtras.cmake
Created attachment 922765 [details] Patch to fix the afected Qt5GuiConfigExtras.cmake based on the upstream resolution
See bug report upstream https://bugreports.qt-project.org/browse/QTBUG-39859 and upstream fix 8ee19816 in the qtbase submodule https://qt.gitorious.org/qt/qtbase/commit/8ee19816c87918136ea84f8451ab9e9c9764c8de
I would appear the upstream fix is already applied to qtbase-5.3.2, which is already in stable updates. Please re-open if you have any further related issues.