Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In mingw,qmake copy_dir is always error

Tags:

qt

qmake

I want to copy some qml to my build directory.
In .pro, I add:

copydata.commands = $(COPY_DIR) \"$$PWD/plugins\" \"$$DESTDIR/plugins\"

But when I build the project, the copydata is error. The error message is :

xcopy /s /q /y /i "E:/myproject/src/plugins" "E:/myproject/bin/debug/plugins" Invalid number of parameters

But ,I copy the command to cmd ,it's all right.

Does anyone knows what the wrong is ?

like image 472
behtgod Avatar asked Oct 20 '25 13:10

behtgod


2 Answers

I got it!
Thank you, macetw, you point the way.

The correct code should be:

copydata.commands = $(COPY_DIR) $$shell_path($$PWD/plugins) $$shell_path($$DESTDIR/plugins)
like image 198
behtgod Avatar answered Oct 23 '25 07:10

behtgod


Windows might get confused by those forward slashes. Try backslashes in all cases.

like image 25
macetw Avatar answered Oct 23 '25 08:10

macetw