how-to-use/qtuse.txt
2024-03-08 13:36:39 +08:00

59 lines
1.5 KiB
Plaintext

1.Qmake配置说明
# 变量说明
$$PWD: 是 xx.pro 所在的目录。
$PWD: 是 exe,即可执行程序所在目录。
$$(PWD): 添加括号后,为家目录。
# moc、rcc、ui、obj泽文件的输出路径
Debug:MOC_DIR = $$PwD/tmp/debug
Debug:RCC_DIR = $$PWD/tmp/debug
Debug:UI_DIR = $$PwD/tmp/debug
Debug:OBJECTS_DIR = $$PWD/tmp/debug
Release:MOC_DIR = $$PwD/tmp/release
Release:RCC_DIR = $$PWD/tmp/release
Release:UI_DIR = $$PwD/tmp/release
Release:OBJECTS_DIR = $$PWD/tmp/release
# 应用程序输出路径
Debug:DESTDIR = $$PWD/bin/debug
Release:DESTDIR =$$PWD/bin/release
#动态库的依赖
Debug: LIBS += $$PWD/bin/debug/SerialPort.lib
Release:LIBS += $$PWD/bin/release/SerialPort.lib
INCLUDEPATH += $$PWD/component/SerialPortLib
Debug:LIBS += $$PWD/bin/debug/CommonDll.lib
Release:LIBS += $$PWD/bin/release/CommonDll.lib
INCLUDEPATH += $$PWD/component/CommonDLl
# 判断 32 或者 64 位
contains(DEFINES, WIN64) {
CONFIG(debug, debug|release) {
LIBS += -L$$PWD/lib/tools/opencv/x64 -lopencv_world3410dJelsefLIBS
} else {
LIBS += -L$$PWD/lib/tools/libtiff -ltiff
}
} else {
LIBS += -L$$PWD/lib/tools/opencv/x86-lopencv_core3410dl
CONFIG(debug, debug|release) {
LIBS += -L$$PWD/lib/tools/opencv/x86-lopencv_core3410dl
} else {
LIBS += -L$$PWD/lib/tools/opencv/x86-lopencv_core3410
}
}
# 平台相关性处理
win32 {
!win32-g++: {}
}
linux {
}
INCLUDEPATH += $$PWD/3rd/log4cpp/include/
LIBS += -L$$PWD/3rd/log4cpp/lib -llog4cpp