xmake

Cross-platform Lua-based build system

TLDR

Create new project
$ xmake create [project_name]
Build project
$ xmake
Build with specific mode
$ xmake -m [release]
Run target
$ xmake run [target]
Install package
$ xmake require [package]
Clean build
$ xmake clean
Configure project
$ xmake config -p [linux] -a [x86_64]
Generate IDE project
$ xmake project -k [cmake]

SYNOPSIS

xmake [build] [run] [clean] [require] [config] [options] [target]

DESCRIPTION

xmake is a cross-platform build system. It uses Lua for configuration, providing flexibility while remaining simple.Build configuration in xmake.lua defines targets, dependencies, and compiler options. The syntax is more readable than CMake.Package management is integrated. Dependencies are declared and automatically downloaded and built.Cross-platform support covers Windows, Linux, macOS, and more. Cross-compilation and toolchain management are built-in.Project generation creates files for CMake, Make, Ninja, Visual Studio, and Xcode. This enables integration with other tools.Remote compilation distributes builds across machines. Cache sharing speeds up builds across teams.

PARAMETERS

build

Build project (default).
run [TARGET]
Run target.
clean
Clean build files.
config
Configure project.
require PKG
Install package.
create NAME
Create project.
project -k KIND
Generate project files.
-m MODE
Build mode (debug, release).
-p PLATFORM
Target platform.
-a ARCH
Target architecture.
-v
Verbose output.
-j N
Parallel jobs.

INSTALL

sudo apt install xmake
sudo dnf install xmake
sudo pacman -S xmake
sudo apk add xmake
brew install xmake
nix profile install nixpkgs#xmake

CAVEATS

Less widespread than CMake. Package repository smaller than vcpkg/conan. Lua config has learning curve for some.

HISTORY

xmake was created by ruki around 2015 in China. It provides a modern alternative to CMake with integrated package management and simpler syntax.

SEE ALSO

cmake(1), make(1), meson(1), ninja(1)