您的位置:首页 > 编程语言 > Qt开发

在 Qt 的 .pro 中定义拷贝文件或者文件夹

2017-06-15 23:14 465 查看
转自,备用http://www.jianshu.com/p/166871ab31ef

win32 {
src_dir = $$PWD\Resources\*.*
CONFIG(debug, debug|release) {
dst_dir = $$OUT_PWD\\debug\\Resources\\
} else {
dst_dir = $$OUT_PWD\\release\\Resources\\
}

# dst_dir 最后的 \\ 是必须的,用来标示 xcopy 到一个文件夹,若不存在,创建之

# Replace slashes in paths with backslashes for Windows
src_dir ~= s,/,\\,g
dst_dir ~= s,/,\\,g

!exists($$dst_dir):system(xcopy $$src_dir $$dst_dir /y /e)
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: