Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Cmake generator builds DEBUG version with CMAKE_BUILD_TYPE=Release
I am trying to build a project in DEBUG & RELEASE versions. I have set my build settings for cmake generator as follows:
I have custom INSTALL commands in my CMakeLists.txt file for both Release and Debug versions to pull relevant
.dllfiles. When i generate and build DEBUG type it builds fine. Default path such as
path\DEPLOY\bin\Debugis created and
When i generate for Release mode, it creates a
Debugfolder exactly like
path\DEPLOY\bin\Debugand on building i see, it pulls all the
debug versions of .dlland creates a
To cross check, i built my project with
Cmake-GUIand build with
VS 2015everything works fine both in Debug and Release versions. So, nothing wrong with my
In my build output i could see this:
even when my
It somehow still thinks configuration is set to
PS: I recently updated my Qt Creator from 4.2 => 4.12.4 but i still need to use Qt SDK 5.7.1 (not allowed to change this) on Win 10.
This is a problem of msbuild - you have to pass the build configuration to msbuild via '/property:Configuration=Release'
@Christian-Ehrlicher and how do i do that? Can i set it in QtCreator? Or do i need to add it in some build step?
Understood. I added
/property:Configuration=Releasein the Tool arguments of release build. Build arguments should look like this
cmake.exe --build . --target install -- /property:Configuration=Release.