qt - 我如何告诉 qmake 有关源文件目录的信息?

标签 qt qmake

我有一个文件夹,其中包含我的源代码 (*.cpp)。我怎样才能告诉 qmake 在那里寻找资源?我不想为每个 .cpp 文件写完整路径。

对于包含文件,我可以说:

INCLUDEPATH += /path/to/include/files

源文件有类似的东西吗?

最佳答案

您正在寻找的是 VPATH。

VPATH

Tells qmake where to search for files it cannot open. For example, if qmake looks for SOURCES and finds an entry that it cannot open, it looks through the entire VPATH list to see if it can find the file on its own.

关于qt - 我如何告诉 qmake 有关源文件目录的信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18946018/

相关文章:

c++ - 在基于命令行的QT插件程序中包含库

windows - 使用 qtcreator 和 qmake,但不包括 QT 依赖项

c++ - 使用 QuaZip 提取 .cbz 并在 Qt 中创建 QImages?

python - Qt Creator 启动调试器失败

c++ - 使用 foreach 遍历嵌套的 QHash

c++ - 打开应用程序主窗口 在系统托盘图标的其他应用程序之上

c++ - 应用程序QT崩溃(带进度条的ftp下载)

linux - Qmake - 不在 Linux 中复制文件

c++ - 无法在 Mac 终端中运行 qmake

c++ - 将 Boost 库与 mingw 一起使用