问题描述
编译qt app 时,我正在运行qmake && make
。
我也想运行make install
,所以我将填充信息添加到了pro
文件中:
target.files += $$OUT_PWD/$(DESTDIR)/$(TARGET)
target.path += /opt/zview
INSTALLS += target
但正在运行make install
make: nothing to be done for 'install'.
解决方法
qmake在将文件添加到安装目标之前检查文件是否存在。由于您的构建目标不存在,但它失败了。
您应该完全省略“ target.files”,以便让qmake自行决定(请参阅qmake手册Advanced Usage下的“安装文件”小节)。
# target.files are set by qmake automatically as it's a well-known set name
#target.files += $$OUT_PWD/$(DESTDIR)/$(TARGET)
target.path += /opt/zview
INSTALLS += target