Repolode
xmake-io

xmake-io/xmake

A cross-platform build utility based on Lua that builds C/C++ and many other languages, with a built-in package manager.

Open-source alternative to:CMake

Stars
12,291
Forks
964
Open issues
274
Last commit
8 hours ago

What is it?

Xmake is a build tool scripted in Lua, configured through a single xmake.lua file. It can compile source code directly, similar to Make or Ninja, or generate project files for CMake, Meson, Visual Studio, Makefiles and compile_commands.json. It also includes a built-in package manager for pulling in C/C++ dependencies from its official repository and third-party sources such as vcpkg, Conan, Homebrew and apt.

The tool targets many platforms, including Windows, macOS, Linux, the BSDs, Android, iOS and WebAssembly, and supports cross-compilation with toolchain management. Beyond C and C++, it handles Objective-C, Swift, Rust, Go, Zig, Fortran, CUDA and several other languages, as well as mixed-language projects. Features include incremental compilation, C++ modules, remote and distributed compilation, and local or remote build caching.

Key features

  • 01Build configuration written in a concise Lua-based xmake.lua file.
  • 02Built-in package manager that integrates dependencies from xmake-repo, vcpkg, Conan and others.
  • 03Generates Visual Studio, CMake, Ninja, Makefile and compile_commands.json project files.
  • 04Cross-compilation with built-in toolchain management across many platforms.
  • 05Remote, distributed and local/remote build caching support.

Use cases

  • Building a cross-platform C/C++ project that must target Windows, Linux, macOS and Android from one configuration.
  • Integrating C/C++ libraries such as zlib or tbox without manually managing them.
  • Generating Visual Studio or CMake project files for teammates using other IDEs.
  • Speeding up large C/C++ builds with distributed compilation or build caching.

Quick start

  1. 1

    Run the official install script from the README (cURL, Wget, or PowerShell)

  2. 2

    Build the project from its root directory

    xmake
  3. 3

    Run the console target

    xmake run console

Topics

FAQ

What is xmake?
A cross-platform build utility based on Lua that builds C/C++ and many other languages, with a built-in package manager. Xmake is a build tool scripted in Lua, configured through a single xmake.lua file. It can compile source code directly, similar to Make or Ninja, or generate project files for CMake, Meson, Visual Studio, Makefiles and compile_commands.json. It also includes a built-in package manager for pulling in C/C++ dependencies from its official repository and third-party sources such as vcpkg, Conan, Homebrew and apt.
Is xmake free to use? What license does it have?
xmake is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is xmake still maintained?
Actively maintained. The last commit to xmake was on Nov 7, 2026.
What can I use xmake for?
Building a cross-platform C/C++ project that must target Windows, Linux, macOS and Android from one configuration. Integrating C/C++ libraries such as zlib or tbox without manually managing them. Generating Visual Studio or CMake project files for teammates using other IDEs. Speeding up large C/C++ builds with distributed compilation or build caching.
How do I install xmake?
Run the official install script from the README (cURL, Wget, or PowerShell) Build the project from its root directory: xmake Run the console target: xmake run console
Where can I get xmake?
The source code and installation instructions are on GitHub: https://github.com/xmake-io/xmake

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects