1. xmake介绍
XMake是一个基于Lua的轻量级跨平台自动构建工具,支持在各种主流平台上构建项目
xmake的目标是开发者更加关注于项目本身开发,简化项目的描述和构建,并且提供平台无关性,使得一次编写,随处构建
它跟cmake、automake、premake有点类似,但是机制不同,它默认不会去生成IDE相关的工程文件,采用直接编译,并且更加的方便易用 采用lua的工程描述语法更简洁直观,支持在大部分常用平台上进行构建,以及交叉编译
并且xmake提供了创建、配置、编译、打包、安装、卸载、运行等一些actions,使得开发和构建更加的方便和流程化。
不仅如此,它还提供了许多更加高级的特性,例如插件扩展、脚本宏记录、批量打包、自动文档生成等等。
2. 安装
via curl
bash <(curl -fsSL https://xmake.io/shget.text)
via wget(我选择)
bash <(wget https://xmake.io/shget.text -O -)
via powershell
Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
参考:
https://github.com/xmake-io/xmake
3. 构建编译环境