qt - qmake 安装的多个安装路径

标签 qt makefile qmake

如何使用qmake将编译好的二进制库文件放在多个路径中?我发现在 target.path 中指定多个路径会导致覆盖 Makefile 中的目标。是否可以使用 qmake 将安装安装到多个路径中?

最佳答案

通过在 .pro 文件中添加这样的内容已经解决了:

target1.path=$${PWD}/../relative/install/path/for/depependend/project/1
unix:target1.files=$${DESTDIR}/*.so*
win32:target1.files=$${DESTDIR}/*.dll

target2.path=$${PWD}/../relative/install/path/for/depependend/project/2
unix:target2.files=$${DESTDIR}/*.so*
win32:target2.files=$${DESTDIR}/*.dll

target3.path=$${PWD}/../relative/install/path/for/depependend/project/3
unix:target3.files=$${DESTDIR}/*.so*
win32:target3.files=$${DESTDIR}/*.dll

INSTALLS += target1 target2 target3

关于qt - qmake 安装的多个安装路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34268319/

相关文章:

css - QStyleSheet 覆盖通用样式

c++ - Qt在不在主类中的函数中执行SQL命令

makefile - makefile 中的 "all"代表什么?

makefile - 从 FreeBSD makefile 中的 CFLAGS 中删除标志

qt - 如何解决qmake项目中链接log4cxx时 undefined reference 错误

c++ - codelite 5.1 找不到 <QString>

android - Qt OpenCV Android 代码不会在 capture.grab() 之前移动

c++ - 目标文件生成和使用 makefile 进行链接的最佳实践 - C++

qt - 编译前复制文件

qt - 如何告诉 qmake 对共享库使用 .dll.a 后缀