Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81903

CMake find_package Qt5 broken on MinGW using CMake 3.17

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.14.1, 5.15.0 Alpha
    • Fix Version/s: 5.14.2, 5.15.0 Alpha
    • Component/s: Build System
    • Labels:
      None
    • Platform/s:
      Windows
    • Commits:
      4d798801e0f106aeda3f1a525379fab9eaa4161f (qt/qtbase/5.14)

      Description

      CMake 3.17 with MinGW: Update find_library to not find plain .dll files fails on MinGW 8.1 at find_package(Qt5). Found this while trying to build Qt Creator.

      Error is below:

      -- Found DesignerComponents: C:/Qt/5.15.0/mingw81_64/lib/libQt5DesignerComponents.a
      CMake Error at C:/Qt/5.15.0/mingw81_64/lib/cmake/Qt5OpenGLExtensions/Qt5OpenGLExtensionsConfig.cmake:92 (message):
        Library not found: glu32
      Call Stack (most recent call first):
        C:/Qt/5.15.0/mingw81_64/lib/cmake/Qt5OpenGLExtensions/Qt5OpenGLExtensionsConfig.cmake:269 (_qt5_OpenGLExtensions_process_prl_file)
        C:/Qt/5.15.0/mingw81_64/lib/cmake/Qt5Quick3DRender/Qt5Quick3DRenderConfig.cmake:106 (find_package)
        C:/Qt/5.15.0/mingw81_64/lib/cmake/Qt5Quick3DAssetImport/Qt5Quick3DAssetImportConfig.cmake:106 (find_package)
        C:/Qt/5.15.0/mingw81_64/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
        cmake/FindQt5.cmake:27 (find_package)
        src/plugins/qmldesigner/CMakeLists.txt:281 (find_package)
      
      
      -- Configuring incomplete, errors occurred!
      See also "C:/Projects/QtCreator/build-mingw/CMakeFiles/CMakeOutput.log".
      

      The workaround is to specify to CMake where to find the library:

      find_library(glu32_PATH glu32 HINTS ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
      

        Attachments

        For Gerrit Dashboard: QTBUG-81903
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            cadam Cristian Adam
            Reporter:
            cadam Cristian Adam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes