如何使用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/