若该文为原创文章,未经允许不得转载
原博主博客地址:https://blog.csdn.net/qq21497936
原博主博客导航:https://blog.csdn.net/qq21497936/article/details/102478062
本文章博客地址:https://blog.csdn.net/qq21497936/article/details/93745527
各位读者,知识无穷而人力有穷,要么改需求,要么找专业人士,要么自己研究
红胖子(红模仿)的博文大全:开发技术集合(包含Qt实用技术、树莓派、三维、OpenCV、OpenGL、ffmpeg、OSG、单片机、软硬结合等等)持续更新中…(点击传送门)
Qt开发专栏:实用技巧(点击传送门)
需求
三方库dll与模块打成一个包,执行应用时,需要将dll拷贝到可执行目录
添加拷贝脚本
在.pro或.pri中添加如下脚本代码
win32{ # copy ffmpeg src_file = $$PWD/qtAv/ffmpeg/bin/* dst_file = $$OUT_PWD target_file = $$DESTDIR src_file ~= s,/,\\,g dst_file ~= s,/,\\,g target_file ~= s,/,\\,g system(xcopy $$src_file $$dst_file /y /s/q/e) system(xcopy $$src_file $$target_file /y /s/q/e) # copy qtav src_file = $$PWD/qtAv/qtAv/bin/* dst_file = $$OUT_PWD target_file = $$DESTDIR src_file ~= s,/,\\,g dst_file ~= s,/,\\,g target_file ~= s,/,\\,g system(xcopy $$src_file $$dst_file /y /s/q/e) system(xcopy $$src_file $$target_file /y /s/q/e) }
win32{ # copy lib src_file = $$PWD/qrCode/lib/* dst_file = $$OUT_PWD src_file ~= s,/,\\,g dst_file ~= s,/,\\,g system(xcopy $$src_file $$dst_file /y /s/q/e) }
原博主博客地址:https://blog.csdn.net/qq21497936
原博主博客导航:https://blog.csdn.net/qq21497936/article/details/102478062
本文章博客地址:https://blog.csdn.net/qq21497936/article/details/93745527