I googled this question but didn't find any working solution.
Eventually I decided to ask it once again.
Can anybody provide me with a WORKING example of pro-file that copies qt dlls into output directory?
I tried this:
CONFIG += qt release
SOURCES += src/main.cpp
message($(QTDIR)) # output: c:\Qt\4.8.4_vs2008\
# Method 1
qt_libs.path=release
qt_libs.files=$(QTDIR)bin/QtCore4.dll
INSTALLS += qt_libs
# Method 2
EXTRA_BINFILES += $(QTDIR)bin/QtCore4.dll
EXTRA_OUT_FILES += release
for(FILE,EXTRA_BINFILES){
QMAKE_POST_LINK += $$quote(cp $${FILE} $$EXTRA_OUT_FILES $$escape_expand(\\n\\t))
}
CONFIG += qt release
SOURCES += src/main.cpp
message($(QTDIR)) # output: c:\Qt\4.8.4_vs2008\
# Method 1
qt_libs.path=release
qt_libs.files=$(QTDIR)bin/QtCore4.dll
INSTALLS += qt_libs
# Method 2
EXTRA_BINFILES += $(QTDIR)bin/QtCore4.dll
EXTRA_OUT_FILES += release
for(FILE,EXTRA_BINFILES){
QMAKE_POST_LINK += $$quote(cp $${FILE} $$EXTRA_OUT_FILES $$escape_expand(\\n\\t))
}
To copy to clipboard, switch view to plain text mode
But it also doesn't work.
$(QTDIR) suddenly becomes empty. Although message($(QTDIR)) above produces a valid path to qt installations.
Bookmarks