{"id":13896237,"url":"https://github.com/xmake-io/luarocks-build-xmake","last_synced_at":"2025-05-07T11:22:24.174Z","repository":{"id":94330095,"uuid":"330178601","full_name":"xmake-io/luarocks-build-xmake","owner":"xmake-io","description":"A luarocks build module based on xmake","archived":false,"fork":false,"pushed_at":"2025-01-30T15:46:19.000Z","size":187,"stargazers_count":19,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T21:25:59.046Z","etag":null,"topics":["cplusplus","lua","luarocks","makefile","xmake"],"latest_commit_sha":null,"homepage":"https://xmake.io","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmake-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"waruqi","open_collective":"xmake","custom":"https://xmake.io/#/sponsor"}},"created_at":"2021-01-16T14:17:17.000Z","updated_at":"2025-02-22T01:50:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"d96f9f81-b021-481a-9fcf-cfb0746add44","html_url":"https://github.com/xmake-io/luarocks-build-xmake","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fluarocks-build-xmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fluarocks-build-xmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fluarocks-build-xmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fluarocks-build-xmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmake-io","download_url":"https://codeload.github.com/xmake-io/luarocks-build-xmake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252866132,"owners_count":21816397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cplusplus","lua","luarocks","makefile","xmake"],"created_at":"2024-08-06T18:02:45.769Z","updated_at":"2025-05-07T11:22:24.141Z","avatar_url":"https://github.com/xmake-io.png","language":"Lua","funding_links":["https://github.com/sponsors/waruqi","https://opencollective.com/xmake","https://xmake.io/#/sponsor"],"categories":["Lua"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://xmake.io\"\u003e\n    \u003cimg width=\"160\" heigth=\"160\" src=\"https://tboox.org/static/img/xmake/logo256c.png\"\u003e\n  \u003c/a\u003e\n\n  \u003ch1\u003eluarocks-build-xmake\u003c/h1\u003e\n\n  \u003cdiv\u003e\n    \u003ca href=\"https://www.reddit.com/r/xmake-io/\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/chat-on%20reddit-ff3f34.svg?style=flat-square\" alt=\"Reddit\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://gitter.im/tboox/tboox?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\u003e\n      \u003cimg src=\"https://img.shields.io/gitter/room/tboox/tboox.svg?style=flat-square\u0026colorB=96c312\" alt=\"Gitter\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://t.me/tbooxorg\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/chat-on%20telegram-blue.svg?style=flat-square\" alt=\"Telegram\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://jq.qq.com/?_wv=1027\u0026k=5hpwWFv\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/chat-on%20QQ-ff69b4.svg?style=flat-square\" alt=\"QQ\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/XXRp26A4Gr\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=flat-square\" alt=\"Discord\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/xmake-io/luarocks-build-xmake/blob/master/LICENSE.md\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/license/xmake-io/luarocks-build-xmake.svg?colorB=f48041\u0026style=flat-square\" alt=\"license\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://xmake.io/pages/donation.html#donate\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/donate-us-orange.svg?style=flat-square\" alt=\"Donate\" /\u003e\n    \u003c/a\u003e\n  \u003c/div\u003e\n\n  \u003cp\u003eA luarocks build module based on xmake\u003c/p\u003e\n\u003c/div\u003e\n\n## Introduction ([中文](/README_zh.md))\n\nA fork of built-in build system for C++ rocks. Specify \"xmake\" as build type and \"luarocks-build-xmake\" as dependency to use it.\n\nAbout xmake, please see [xmake](https://github.com/xmake-io/xmake).\n\n## Example1 (with xmake.lua)\n\nWe can build c/c++ modules if the project contain xmake.lua\n\n```\n├── src\n│   ├── test.c\n│   └── test.h\n└── xmake.lua\n```\n\n#### xmake.lua\n\nWe need to use `add_rules(\"lua.module\")` to add build rules for lua modules.\n\n```lua\nadd_rules(\"mode.debug\", \"mode.release\")\n\ntarget(\"example1.hello\")\n    add_rules(\"lua.module\")\n    add_files(\"src/test.c\")\n```\n\n#### rockspec\n\n```lua\npackage = \"example1\"\nversion = \"1.0-1\"\nsource = {\n    url = \"git://github.com/xmake-io/luarocks-build-xmake\",\n    tag = \"example1\"\n}\ndependencies = {\n    \"lua \u003e= 5.1\",\n    \"luarocks-build-xmake\"\n}\nbuild = {\n    type = \"xmake\",\n    copy_directories = {}\n}\n```\n\n## Example2 (without xmake.lua)\n\nWe can use xmake as builtin build type to build c/c++ modules if the project does not contain xmake.lua\n\n```\n├── src\n    ├── test.c\n    └── test.h\n```\n\n#### rockspec\n\n```lua\npackage = \"example2\"\nversion = \"1.0-1\"\nsource = {\n    url = \"git://github.com/xmake-io/luarocks-build-xmake\",\n    tag = \"example2\"\n}\ndependencies = {\n    \"lua \u003e= 5.1\",\n    \"luarocks-build-xmake\"\n}\nbuild = {\n    type = \"xmake\",\n    modules = {\n        [\"example2.hello\"] = {\n            sources = \"src/test.c\"\n        }\n    },\n    copy_directories = {}\n}\n```\n\n## Set special xmake version\n\n```lua\ndependencies = {\n    \"lua \u003e= 5.1\",\n    \"luarocks-build-xmake\"\n}\nbuild = {\n    type = \"xmake\",\n    variables = {\n        xmake = {\n            version = \"2.5.1\"\n        }\n    },\n    copy_directories = {}\n}\n```\n\n## Set xmake compilation configuration\n\n```lua\ndependencies = {\n    \"lua \u003e= 5.1\",\n    \"luarocks-build-xmake\"\n}\nbuild = {\n    type = \"xmake\",\n    variables = {\n        xmake = {\n            plat = \"mingw\",\n            arch = \"x86_64\",\n            mode = \"debug\",\n            cflags = \"-DTEST1\",\n            cc = \"gcc\",\n            ld = \"gcc\",\n            ldflags = \"...\",\n            mingw = \"mingw sdk path\",\n            vs = \"2019\",\n            vs_runtime = \"MT\",\n            vs_toolset = \"\",\n            vs_sdkver = \"\",\n        }\n    },\n    copy_directories = {}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmake-io%2Fluarocks-build-xmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmake-io%2Fluarocks-build-xmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmake-io%2Fluarocks-build-xmake/lists"}