【问题标题】:adding install to QT pro file将安装添加到 QT pro 文件
【发布时间】:2020-09-11 06:31:51
【问题描述】:

在编译 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'.

如何正确地将安装添加到我的 pro 文件中?

【问题讨论】:

  • 编译qt时你说的是编译Qt,还是Qt应用?
  • 也许你的文件已经在那里了?日志中还有其他内容吗?

标签: c++ qt makefile qmake


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-07-03
    • 1970-01-01
    • 2019-05-10
    • 2011-03-02
    • 1970-01-01
    • 2021-11-09
    • 1970-01-01
    相关资源
    最近更新 更多