【发布时间】:2015-04-16 19:58:45
【问题描述】:
我无法将多个文件添加到 Qt 额外编译器的输出。
这是我的额外编译器的样子:
new_target.input = $${INPUT_HEADERS}
new_target.output = $${OUTPUT_FILES}
new_target.commands = python $${SCRIPT_NAME}.py $${CONFIG_FILE} --generate
new_target.CONFIG += target_predeps
new_target.variable_out = SOURCES
new_target.dependency_type = TYPE_C
QMAKE_EXTRA_COMPILERS += new_target
在$${OUTPUT_FILES} 不包含多个文件之前一切正常。(例如: OUTPUT_FILES=first.cpp second.cpp third.cpp)
因此,qmake 只识别提到的第一个。
是否可以将多个文件传递给 .output 字段?
我正在使用 Qt 4.8.6
【问题讨论】:
-
非常简单:每个目标一个输出。如果需要 3 个输出,则需要 3 个目标。