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

Qt5*Config.cmake doesn't handle MINSIZEREL/RELWITHDEBINFO configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.0.0
    • Build tools: Other
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            joonhwan Joonhwan Lee
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes