Giter VIP home page Giter VIP logo

xmake-repo's Introduction

xmake-repo

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. πŸ™

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

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
package("libpng")
    set_homepage("http://libpng.sf.net")
    set_description("LIBPNG: Portable Network Graphics support, official libpng repository")

    add_urls("https://github.com/glennrp/libpng/archive/refs/tags/$(version).tar.gz",
             "https://github.com/glennrp/libpng.git")
    add_versions("v1.6.35", "6d59d6a154ccbb772ec11772cb8f8beb0d382b61e7ccc62435bf7311c9f4b210")

    add_deps("cmake")

    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)
    end)

    on_test(function (package)
        assert(package:has_cfuncs("foo", {includes = "foo.h"}))
    end)
packages/l/libpng/xmake.lua generated!

Test a package in local

$ xmake l scripts/test.lua --shallow -vD zlib
$ xmake l scripts/test.lua --shallow -vD -p iphoneos zlib
$ xmake l scripts/test.lua --shallow -vD -k shared -m debug zlib
$ xmake l scripts/test.lua --shallow -vD --vs_runtime=MD zlib

xmake-repo's People

Contributors

waruqi avatar xq114 avatar sirlynix avatar star-hengxing avatar pucklaj avatar heheda123123 avatar arthapz avatar yamashi avatar cyfdecyf avatar chi-eee avatar qudix avatar zhangxp1998 avatar da-liii avatar l-sun avatar imperators79 avatar fasiondog avatar jj683 avatar bricklou avatar latias94 avatar dragonjoker avatar maximegmd avatar wssdude avatar yszhou2019 avatar jingkaimori avatar a2va avatar chriscatcp avatar barenboim avatar yecate avatar paul-reilly avatar wsw0108 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.