📦 An official xmake package repository



An official xmake package repository

Supporting the project

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. 🙏 [Become a sponsor]

Introduction (中文)

xmake-repo is an official xmake package repository.

Package dependences

Package management

If you want to know more, please refer to the xmake documentation:


xrepo is a cross-platform C/C++ package manager based on Xmake.

It is based on the runtime provided by xmake, but it is a complete and independent package management program. Compared with package managers such as vcpkg/homebrew, xrepo can provide C/C++ packages for more platforms and architectures at the same time.

If you want to know more, please refer to the xrepo documentation:

Submit package to repository

Write a xmake.lua of new package in packages/x/xxx/xmake.lua and push a pull-request to the dev branch.

For example, packages/z/zlib/xmake.lua:

If you want to known more, please see: Create and Submit packages to the official repository

Create a package template from Github

We need to install the gh cli tool first, and then execute the following command to log in to github.

$ gh auth login

Create a package configuration file to this warehouse based on the package address of github.

$ xmake l scripts/new.lua github:glennrp/libpng
    set_description("LIBPNG: Portable Network Graphics support, official libpng repository")

    add_versions("v1.6.35", "6d59d6a154ccbb772ec11772cb8f8beb0d382b61e7ccc62435bf7311c9f4b210")


    on_install(function (package)
        local configs = {}
        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
        table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
        import("package.tools.cmake").install(package, configs)

    on_test(function (package)
        assert(package:has_cfuncs("foo", {includes = "foo.h"}))
packages/l/libpng/xmake.lua generated!
  • 使用 cmake tool 编译 android armv7 架构时出错

    使用 cmake tool 编译 android armv7 架构时出错

    xmake 2.3.7

    尝试添加flatbuffers,但发现无法编译android armv7版本(armv8可以)。经查,发现xmake 的cmake工具在编译armv7时,给cmake的参数 “-DANDROID_ABI=armv7”错误,应该是 “-DANDROID_ABI=armeabi-v7a”,导致无法编译。(手工讲 xmake 生成的 cmake 编译命令里的 armv7 改成 armeabi-v7a 后可以顺利编译)

    使用的xmake.lua如下: package("flatbuffers")

    set_description("FlatBuffers is a cross platform serialization library architected for maximum memory efficiency.")
    on_load(function (package)
        if is_plat("windows", "linux", "macosx") then
            package:addenv("PATH", "bin")
        local configs = {"-DFLATBUFFERS_BUILD_TESTS=OFF"}
        if is_plat("android", "iphoneos") then
            table.insert(configs, "-DFLATBUFFERS_BUILD_FLATC=OFF")
            table.insert(configs, "-DFLATBUFFERS_BUILD_FLATHASH=OFF")
        import("package.tools.cmake").install(package, configs)
        if is_plat("macosx", "linux") then
            os.cp("build_*/flatc", package:installdir("bin"))
            os.cp("build_*/flathash", package:installdir("bin"))
        elseif is_plat("windows") then
            os.cp("build_*/flatc.exe", package:installdir("bin"))
            os.cp("build_*/flathash.exe", package:installdir("bin"))
    opened by fasiondog 24
  • Manjaro: errors installing drogon package

    Manjaro: errors installing drogon package

    This is with a new xmake install, a build of the dev branch, package directories were also deleted.

    The build of the package is failing with linker errors in the on_test assert. As requested here is the output with -vD (it is too long to paste here):


    opened by paul-reilly 23
  • 自定义grpc仓库安装失败


    Xmake 版本

    xmake v2.6.4+202204081556




    -- Installing: /home/qingfeng.nan/.xmake/packages/g/grpc/master/4e0143c97b65425b855ad5fd03038b6a/lib/cmake/protobuf/protobuf-targets-release.cmake
    CMake Error at third_party/protobuf/cmake_install.cmake:728 (file):
      file INSTALL cannot find
    Call Stack (most recent call first):
      cmake_install.cmake:2145 (include)
    make: *** [Makefile:62: install] Error 1
    error: execv(make install) failed(2)
      => install grpc master .. failed
    error: install failed!




    set_description("The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)")
    set_license("Apache-2.0 License")
    on_install(function (package)
        local configs = {}
        table.insert(configs, "-DgRPC_INSTALL=ON")
        table.insert(configs, "-DCMAKE_BUILD_TYPE=Release")
        table.insert(configs, "-DgRPC_BUILD_TESTS=OFF")
        import("package.tools.cmake").install(package, configs)


    No response

    opened by nqf 21
  • 您好,希望支持工具链镜像路径,国内下载实在太慢










    opened by Dozingfiretruck 21
  • 包python在Windows下安装失败


    !!! 注:提问题时若使用不能用/没效果/有问题/报错此类模糊表达,但又没有根据下面的模板给出任何相关辅助信息的,将会直接标记为 Invalid。


    Windows 10下,python安装失败。





    $ xmake -vD
    Scanning the drive for archives:
    1 file, 25695060 bytes (25 MiB)
    Extracting archive: python-3.9.5.win64.zip
    Path = python-3.9.5.win64.zip
    Type = zip
    Physical Size = 25695060
    Everything is Ok
    Folders: 42
    Files: 3902
    Size:       66511416
    Compressed: 25695060
    error: @programdir\core\sandbox\modules\os.lua:97: cannot move py.exe to D:\packages\xmake\p\python                    n\3.9.5\6b1016917a8d49d09144bff5b8663f83\bin\py.exe Unknown
    stack traceback:
        [C]: in function 'error'
        [@programdir\core\base\os.lua:796]: in function 'raise'
        [@programdir\core\sandbox\modules\os.lua:97]: in function 'mv'
        [F:\GitHub\xmake-repo\packages\p\python\xmake.lua:78]: in function 'script'
        [...dir\modules\private\action\require\impl\utils\filter.lua:125]: in function 'call'
        [C]: in function 'trycall'
        [@programdir\core\sandbox\modules\try.lua:121]: in function 'try'
        [...\modules\private\action\require\impl\actions\install.lua:137]: in function 'action_install'
        [...modules\private\action\require\impl\install_packages.lua:350]: in function 'jobfunc'
        [C]: in function 'trycall'
        [@programdir\core\sandbox\modules\try.lua:121]: in function 'try'
        [@programdir\modules\private\async\runjobs.lua:201]: in function 'cotask'
      => install python 3.9.5 .. failed
    error: @programdir\modules\private\async\runjobs.lua:232: ...\modules\private\action\require\impl\a                    actions\install.lua:253: install failed!
    stack traceback:
        [C]: in function 'error'
        [@programdir\core\base\os.lua:796]: in function 'raise'
        [...\modules\private\action\require\impl\actions\install.lua:253]: in function 'catch'
        [@programdir\core\sandbox\modules\try.lua:127]: in function 'try'
        [...\modules\private\action\require\impl\actions\install.lua:137]: in function 'action_install'
        [...modules\private\action\require\impl\install_packages.lua:350]: in function 'jobfunc'
        [C]: in function 'trycall'
        [@programdir\core\sandbox\modules\try.lua:121]: in function 'try'
        [@programdir\modules\private\async\runjobs.lua:201]: in function 'cotask'
    stack traceback:
            [C]: in function 'error'
            @programdir\core\base\os.lua:796: in function 'raise'
            @programdir\modules\private\async\runjobs.lua:232: in function 'catch'
            @programdir\core\sandbox\modules\try.lua:127: in function 'try'
            @programdir\modules\private\async\runjobs.lua:201: in function 'cotask'
            @programdir\core\base\scheduler.lua:365: in function <@programdir\core\base\scheduler.lua:362>
    error: execv(xmake require -f -y --build -v -D python) failed(-1)

    如果日志太多,可以上传附件,但必须完整,否则一率标记为 Invalid。



    • xmake版本:2.5.5
    • xmake运行平台:Windows 10
    • xmake目标平台:


    xmake l .\scripts\test.lua -vD python

    opened by wsw0108 21
  • opencv 安装报错

    opencv 安装报错

    !!! 注:提问题时若使用不能用/没效果/有问题/报错此类模糊表达,但又没有根据下面的模板给出任何相关辅助信息的,将会直接标记为 Invalid。


    Windows 环境,xrepo install opencv 报错

    if you want to get verbose errors, please see:
      -> C:\Users\11127844\AppData\Local\.xmake\cache\packages\2107\o\opencv\4.5.2\installdir.failed\logs\install.txt
    error: install failed!
    error: execv(xmake require -j 12 --extra={system=false} opencv) failed(-1)
    opened by Heafei 20
  • add imagemagick package

    add imagemagick package

    This needs to be tested on bsd and macosx before merging. It should apparently work the exact same way as installing on Linux according to the docs, but I wanna be sure. Edit: lol I forgot there are CIs for that.

    opened by Phate6660 20
  • add bin2c

    add bin2c


        before_link(function (target) 
            os.vrun("bin2c 2.jpg pic.c pic")
    opened by Biobots 20
  • add_requires(

    add_requires("protobuf-cpp") 没有下载最新版



    当然,如果我们对当前的依赖包的版本没有特殊要求,那么可以直接这么写: add_requires("tbox", "libpng", "zlib") 这会使用已知的最新版本包,或者是master分支的源码编译的包


    opened by playgithub 20
  • Add versions of curl between 7.73 and 7.30

    Add versions of curl between 7.73 and 7.30


    I was trying to add libcurl to my project and I ran into some issues as 7.64.1 has a test that doesn't compile on Windows because of an empty file. (btw, maybe we should disable test building in the cmake)

    I tried to upgrade to another version but it seems versions have to be registered in the repository first, so I wrote a little script to fetch all versions from GitHub, download them and compute the SHA256 of the file.

    I didn't go below 7.29 because it doesn't have a .tar.bz2 on the official website, and instead of fixing this I though there was enough curl versions for now.

    Script for reference:

    -- Import parameter option module
    -- Entrance function
    function main(...)
    	local githubPageFile = "github.html"
    	local curlFile = "curl.tar.bz2"
    	local resultFile = "result.lua"
    	local result = io.open(resultFile, "w+")
    	local page = 1
    	local nextPage = "https://github.com/curl/curl/releases"
    		print("Downloading page " .. page .. " ...")
    		http.download(nextPage, githubPageFile)
    		local file = io.open(githubPageFile, "r")
    		local content = file:read("*a")
    		local pattern = [[<a href="/curl/curl/releases/tag/curl%-(%d+)_(%d+)_(%d+)">]]
    		for major, minor, patch in content:gmatch(pattern) do
    			print("Found version " .. major .. "." .. minor .. "." .. patch .. ", downloading...")
    			local url = "https://curl.haxx.se/download/curl-" .. major .. "." .. minor .. "." .. patch .. ".tar.bz2"
    			http.download(url, curlFile)
    			local hash = hash.sha256(curlFile)
    			print("SHA256: " .. hash)
    			local lua = string.format([[add_versions("%d.%d.%d", "%s")]], major, minor, patch, hash)
    			result:write(lua .. "\n")
    		pattern = [[href="(https://github%.com/curl/curl/releases%?after=curl%-%d+_%d+_%d+)">Next]]
    		nextPage = content:match(pattern)
    		page = page + 1
    	until nextPage == nil
    opened by SirLynix 18
  • Trouble creating package that depends on another package

    Trouble creating package that depends on another package

    I am trying to create a LuaSocket package. I have started on an xmake build script in a fork. I know I can build a package using the existing MSVC etc build scripts too.

    Here is the project I am creating the LuaSocket package with locally, which pulls my fork:


    The issue is that when building the simple test project there are unresolved external symbol errors because the LuaJIT libs cannot be found.

    How do I deal with this issue? Can I find out the location of libs of other packages and the working directory of the build system at various points?

    Thanks for any pointers.

    opened by paul-reilly 17
  • add quickjspp library

    add quickjspp library

    • Before adding new features and new modules, please go to issues to submit the relevant feature description first.
    • Write good commit messages and use the same coding conventions as the rest of the project.
    • Please commit code to dev branch and we will merge into master branch in feature
    • Ensure your edited codes with four spaces instead of TAB.

    • 增加新特性和新模块之前,请先到issues提交相关特性说明,经过讨论评估确认后,再进行相应的代码提交,避免做无用工作。
    • 编写友好可读的提交信息,并使用与工程代码相同的代码规范,代码请用4个空格字符代替tab缩进。
    • 请提交代码到dev分支,如果通过,我们会在特定时间合并到master分支上。
    • 为了规范化提交日志的格式,commit消息,不要用中文,请用英文描述。
    opened by dodola 0
  • Google filament, undefined reference to...

    Google filament, undefined reference to...

    Xmake Version


    Operating System Version and Architecture

    Ubuntu 22.04 LTS

    Describe Bug

    Attempting to compile xmake project with google filament produce produces many undefined reference to...

    Expected Behavior

    Expect xmake to build the google filament package

    Project Configuration

    xmake.lua :

    add_rules("mode.debug", "mode.release")


    #include <filament/Engine.h>
    #include <filament/Camera.h>
    #include <filament/Engine.h>
    int main()
        using namespace filament;
        Engine* engine = Engine::create();
        SwapChain* swapChain = engine->createSwapChain(nullptr); // I set nullptr just for the example
        Renderer* renderer = engine->createRenderer();

    Additional Information and Error Logs

    xmake -vD

    opened by ArthurVasseur 20
  • 请求添加tinyobjloader的较新版本







    No response


    No response

    feature request 
    opened by wang-mengdi 1
🔥 Xmake is a cross-platform build utility based on Lua
Notepad++ official repository

What is Notepad++ ? Notepad++ is a free (free as in both "free speech" and "free beer") source code editor and Notepad replacement that supports sever

Notepad++ 16.3k Jun 28, 2022
official repository of the muparser fast math parser library

muparser - Fast Math Parser 2.3.3 (Prerelease) To read the full documentation please go to: http://beltoforion.de/en/muparser. See Install.txt for ins

Ingo Berg 277 Jun 23, 2022
SeqAn's official repository.

ATTENTION: SeqAn3 is out and hosted in a different repository: https://github.com/seqan/seqan3 All new applications should be based on SeqAn3 and all

SeqAn 414 May 4, 2022
Official repository for the programming language Squirrel

The programming language SQUIRREL 3.1 stable -------------------------------------------------- This project has successfully been compiled and run o

Alberto Demichelis 706 Jul 1, 2022
The official Allegro 5 git repository. Pull requests welcome!

Welcome to Allegro! Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such

Allegro 1.4k Jun 25, 2022
This repository is for everyone for Hacktoberfest 2021. Anyone can contribute anything for your Swags (T- Shirt), must be relevant that can add some value to this repository.

Hacktober Fest 2021 For Everyone! Upload Projects or Different Types of Programs in any Language Use this project to make your first contribution to a

Mahesh Jain 16 Dec 21, 2021
This Repository is created to help fellow coders learn open source contributions. This Repository is created for Hacktoberfest 2021

Hacktoberfest 2021 Follow the README below to get started! This Repository is created to help fellow coders learn open source contributions This Repos

Somesh Debnath 7 Apr 26, 2022
This repository is a study repository to implement the LCD 16x2 in my project below

This repository is a study repository to implement the LCD 16x2 in my project below. Index ?? About ?? Functionalities ?? Deploy ?? Requirements ?? Pi

Rickelme Dias 3 Jun 7, 2022
Experimental telegram client based on official Android sources

Catogram Experimental telegram client based on official Android sources Catogram features: Message translator TGX Style of context menu VKUI Icons and

null 179 Jul 3, 2022
Official Vanguard Anti-Cheat source code.

Vanguard Official Vanguard Anti-Cheat source code. Using the compiled binary For ease, an unprotected compiled version of Vanguard is available. Downl

Riot Vanguard 414 Jun 29, 2022
Inoki's NB1 kernel source tree based on Nokia official tarball

Inoki's NB1 kernel source tree based on Nokia official tarball

Inoki 2 Dec 27, 2021
Arduino official Library

Arduino official Library library extension Meaning print h Serial.print(println) cpp Servo .h サーボにPWM送るやつ binary .h 脳筋二進数定義ファイル Arduino.h #define HIGH

Casey_Nelson 1 Dec 1, 2021
Official Go implementation of the Fixcoin protocol

XFSGO Official Go implementation of the XFS protocol. Usage To learn more about the available xfsgo commands, use xfsgo help or type a command followe

XFS Network 0 May 18, 2022
Official Benchmark client for BerylDB.

Beryl Benchmark What is Beryl-benchmark? beryl-benchmark is a benchmark client for BerylDB. Benchmark is used to run massive tests inside a BerylDB in

BerylDB 3 Nov 11, 2021
Official examples and tools from the JACK project

JACK example tools This repository holds the official JACK example clients and tools, which have been tracked in the example-clients and tools reposit

JACK Audio Connection Kit 19 Jun 13, 2022
This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler

FreeCAD 11.7k Jul 1, 2022
ERASOR - Official page of ERASOR (RA-L'21 with ICRA'21)

?? ERASOR (RA-L'21 with ICRA Option) Official page of "ERASOR: Egocentric Ratio of Pseudo Occupancy-based Dynamic Object Removal for Static 3D Point C

Hyungtae Lim 161 Jun 28, 2022
The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University

SuiteSparse: A Suite of Sparse matrix packages at http://suitesparse.com May 17, 2021. SuiteSparse VERSION 5.10.1 Now includes GraphBLAS, SLIP_LU, and

Tim Davis 612 Jul 1, 2022
Official implementation of the tabfs-28 filesystem as an reuseable library

libtabfs This projects aims to implement TabFs-28 as an minimal dependency library so various other projects can use it as they need. License libtabfs

null 3 May 17, 2022