[Interest] qmake with release config is called for debug build

Alexander Dyagilev alervdvcw at gmail.com
Sat Nov 10 09:27:56 CET 2018


Hello,

I'm using the following .pri file:

include(macros.pri)
win32:CONFIG(release, debug|release) {
   VC_RUNTIME_FOLDER="c:/Program Files (x86)/Microsoft Visual Studio 
14.0/VC/redist/x64/Microsoft.VC140.CRT"
   copyFilesToDestdir($$VC_RUNTIME_FOLDER, "msvcp140.dll")
}

It's supposed to copy msvcp140.dll to build folder for Release 
configuration (so it will be included into the installer then).

I do not need this msvcp140.dll to be copied to my Debug folder when I'm 
working on the project. But it does copy it.

Steps:
1) Remove file
2) Run qmake on project (active configuration is Debug).

Result: file is copied.

Can anything be done here except the using of QMAKE_POST_LINK here 
instead? Why is CONFIG(release, debug|release) "not working" here?

Some details below:

copyFilesToDestdir is defined in macros.pri:

defineTest(copyFilesToDestdir) {
     pathSrc = $$1
     files = $$2
     folderDst = $$DESTDIR
     subfolder = $$3
     !isEmpty(subfolder) {
         folderDst=$$folderDst/$$subfolder
     }

     DEST = $$shell_path($$OUT_PWD/$$folderDst)

     for(filename, files) {
         FILE = $$shell_path($$pathSrc/$$filename)
         system($$QMAKE_COPY $$shell_quote($$FILE) $$shell_quote($$DEST))
     }
}




More information about the Interest mailing list