[英]Qt - qmake INSTALL only works for debug configuration
When building my project i want qt to copy the appropriate dll files of opencv depending on the build, either profile
/ release
or debug
. 在构建我的项目时,我希望qt根据构建(
profile
/ release
或debug
复制opencv的相应dll文件。
For now i have the following first approach in my .pro
file: 现在,我在
.pro
文件中具有以下第一种方法:
CONFIG(debug, debug|release) {
OPENCV_PATH = $$OUT_PWD/debug
OPENCV_DLLS += $$files("$$PWD/../../opencv-build/install/x64/vc15/bin/*d.dll", true)
LIBS += $$files("$$PWD/../../opencv-build/install/x64/vc15/lib/*d.lib", false)
message(debug build!)
} else {
OPENCV_PATH = $$OUT_PWD/release
OPENCV_DLLS += $$files("$$PWD/../../opencv-build/install/x64/vc15/bin/*.dll", true)
LIBS += $$files("$$PWD/../../opencv-build/install/x64/vc15/lib/*.lib", false)
message(release build!)
}
opencv.files += $$OPENCV_DLLS
opencv.path = $$OPENCV_PATH
INSTALLS += opencv
When running qmake or changing the deployment i allways get the correct Project MESSAGE
which is debug build!
当运行qmake或更改部署时,我总是获得正确的
Project MESSAGE
,这是debug build!
when debug build is set and release build!
设置调试版本并
release build!
when release build is set. 设置发布版本时。
But the corresponding dll files only get copied in debug build. 但是相应的dll文件仅在调试版本中被复制。
So how can I get Qt to allways copy the corresponding dll files? 那么,如何让Qt始终复制相应的dll文件?
Your approach can also include a full distinction between opencv's debug and release dll's since this is the ultimate goal... 您的方法还可以包括opencv的调试和发行版dll的完全区别,因为这是最终目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.