Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.0.0
-
None
-
Win7K, VS9, VS10
-
67bd27fee2991d91c6aa7098a5842d1737964cad
Description
There are 4 types of CMake generated visual studio project configurations by default(Debug, Release, MinSizeRel, RelWithDebInfo)
No problem with Debug and Release, but the other two configuration(MinSizeRel and RelWithDebInfo) are generated to link debug versions of Qt5 library(like Qt5Guid.lib not Qt5Gui.lib) which is wrong.
Hmm.. I do not understand why cmake handle it like this(MinSizeRel and RelWithDebInfo should be considered as simliar to Release Not Debug).
It was resolved if I changed following lines in Qt5CoreConfig.cmake
Qt5CoreConfig.cmake
if (NOT TARGET Qt5::Core) add_library(Qt5::Core SHARED IMPORTED) _populate_imported_target_properties(DEBUG "Qt5Cored.dll" "Qt5Cored.lib" ) _populate_imported_target_properties(RELEASE "Qt5Core.dll" "Qt5Core.lib" ) endif()
to
Qt5CoreConfig.cmake
if (NOT TARGET Qt5::Core) add_library(Qt5::Core SHARED IMPORTED) _populate_imported_target_properties(DEBUG "Qt5Cored.dll" "Qt5Cored.lib" ) _populate_imported_target_properties(RELWITHDEBINFO "Qt5Core.dll" "Qt5Core.lib" ) _populate_imported_target_properties(MINSIZEREL "Qt5Core.dll" "Qt5Core.lib" ) _populate_imported_target_properties(RELEASE "Qt5Core.dll" "Qt5Core.lib" ) endif()
Attachments
For Gerrit Dashboard: QTBUG-29186 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
48671,2 | List the Release library before the Debug library in cmake files. | stable | qt/qtbase | Status: MERGED | +2 | 0 |