Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.14.1, 5.15.0 Alpha
-
None
-
-
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})