Visual Studio Code 中的 XMake 集成。
您需要先安装xmake和一个带有xmake.lua
.
如果您想了解更多关于 xmake的信息,请参阅xmake-github和网站。
xmake-vscode 将生成.vscode/compile_commands.json
文件,因此您只需添加它.vscode/c_cpp_properties.json
即可启用 IntelliSense。
例如 ( .vscode/c_cpp_properties.json
):
"configurations": [
{
"compileCommands": ".vscode/compile_commands.json",
}
],
}
这些配置设置存储在项目的 c_cpp_properties.json 文件中。要编辑此文件,请在 VS Code 中,从命令面板 (⇧⌘P) 中选择 C/C++: Edit Configurations (UI):
请参阅IntelliSense 进行交叉编译
{
"configuration": {
"type": "object",
"title": "XMake configuration",
"properties": {
"xmake.executable": {
"type": "string",
"default": "xmake",
"description": "The xmake executable name / path"
},
"xmake.logLevel": {
"type": "string",
"default": "normal",
"description": "The Log Level: normal/verbose/minimal",
"enum": [
"verbose",
"normal",
"minimal"
]
},
"xmake.buildLevel": {
"type": "string",
"default": "normal",
"description": "The Build Output Level: normal/verbose/warning/debug",
"enum": [
"verbose",
"normal",
"warning",
"debug"
]
},
"xmake.buildDirectory": {
"type": "string",
"default": "${workspaceRoot}/build",
"description": "The Build Output Directory"
},
"xmake.installDirectory": {
"type": "string",
"default": "",
"description": "The Install Output Directory"
},
"xmake.packageDirectory": {
"type": "string",
"default": "",
"description": "The Package Output Directory"
},
"xmake.workingDirectory": {
"type": "string",
"default": "${workspaceRoot}",
"description": "The Project Working Directory with the root xmake.lua"
},
"xmake.androidNDKDirectory": {
"type": "string",
"default": "",
"description": "The Android NDK Directory"
}
}
}
}
原作者:xmake-io
更多回帖