Lua-based cross-platform build tool for C and C++ with a built-in package manager
open sourceApache-2.0free
Xmake is a cross-platform build utility configured in Lua, mainly for C and C++ but supporting many other languages, including Objective-C, Swift, Rust, Go, Zig, Fortran and CUDA. It can build source code directly, as Make or Ninja do, or generate project files as CMake or Meson do, and it has a built-in package manager for C/C++ dependencies, backed by its official xmake-repo repository of 500+ packages. It handles cross-compilation and toolchain management, parallel and incremental builds, C++20 modules, remote and distributed compilation, and local and remote build caches, and can generate Visual Studio projects, Makefiles, CMake files and compile_commands.json.
Ways to install
Package managers
Problems it solves
- build a C++ project on Windows, macOS and Linux without writing CMake
- pull C/C++ dependencies into my build without vendoring them
- cross-compile a C project for another platform with the right toolchain
Features
- Builds directly or generates Visual Studio, Makefile, CMake and compile_commands.json projects
- Built-in package manager for C/C++ dependencies with an official repository of 500+ packages
- Cross-compilation with toolchain detection and management
- Parallel and incremental builds, including C++20 modules
- Remote and distributed compilation with local and remote build caches
- Lua configuration and plug-ins
Alternatives
The same job
These do what Xmake does.
- CMake A powerful software build system
- Meson Fast, user-friendly open source build system with a readable, non-Turing-complete language
- GNU Libtool GNU's generic library support script for building shared and static libraries portably
