假设我已经下载了一些带有标题和二进制文件的库xyz,并将它放在不在标准搜索路径中的某个位置.对于每个产品,我可以添加搜索路径和库以链接到cpp.includePaths,cpp.libraryPaths,cpp.staticLibraries等.
有更好的[标准]方法吗?如果我正在构建库作为项目的一部分,似乎我可以在Exports项中定义路径,然后使用每个Product中的Depends项自动设置路径.这似乎是一个很好的机制,我想知道是否也没有办法将它用于外部依赖.
qbs文档有点薄......
谢谢!
我想使用Qbs编译现有项目.该项目已包含在此项目中大量使用的代码转换工具(my_tool).
到目前为止我有(简化):
import qbs 1.0
Project {
Application {
name: "my_tool"
files: "my_tool/main.cpp"
Depends { name: "cpp" }
}
Application {
name: "my_app"
Group {
files: 'main.cpp.in'
fileTags: ['cpp_in']
}
Depends { name: "cpp" }
Rule {
inputs: ["cpp_in"]
Artifact {
fileName: input.baseName
fileTags: "cpp"
}
prepare: {
var mytool = /* Reference to my_tool */;
var cmd = new Command(mytool, input.fileName, output.fileName);
cmd.description = "Generate\t" + input.baseName;
cmd.highlight = "codegen";
return cmd;
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
如何获取命令的my_tool引用?
迁移到 QBS 后,我的 QML 调试停止工作。
我确定:
Qt.declarative.qmlDebugging:true Qt.quick.qmlDebugging:trueQtCreator 仍然说:
某些断点无法由当前活动的调试器语言处理,并将被忽略。
QML 调试适用于旧的 .pro
我的系统: