#输出目标名称
TARGET = ProjectABC
#输出目标类型
TEMPLATE = lib
#输出目标目录
DESTDIR = $$PWD/../public/windows/x64
#配置lib文件名称和lib目录
win32:CONFIG(release, debug|release){
LibFile = $${DESTDIR}/$${TARGET}.lib
LibFile = $$replace(LibFile, /, \\);
LibOutputDir = $$PWD/../../../lib/windows/x86/
LibOutputDir = $$replace(LibOutputDir, /, \\);
QMAKE_POST_LINK += copy /Y $$LibFile $$LibOutputDir
}
else:CONFIG(debug, debug|release)
{
LibFile = $${DESTDIR}/$${TARGET}.lib
LibFile = $$replace(LibFile, /, \\);
LibOutputDir = $$PWD/../../../lib/windows/x86/
LibOutputDir = $$replace(LibOutputDir, /, \\);
QMAKE_POST_LINK += copy /Y $$LibFile $$LibOutputDir
}
Qt输出到指定目录
于 2022-12-24 11:18:53 首次发布