{"id":27395898,"url":"https://github.com/bencsikandrei/lua-cmake","last_synced_at":"2025-10-11T04:08:02.742Z","repository":{"id":156656410,"uuid":"381674727","full_name":"bencsikandrei/lua-cmake","owner":"bencsikandrei","description":"Lua built with CMake","archived":false,"fork":false,"pushed_at":"2021-06-30T11:16:35.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T20:11:42.799Z","etag":null,"topics":["c","cmake","lua"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bencsikandrei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-06-30T11:13:40.000Z","updated_at":"2023-09-08T02:35:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e397d7f8-1472-4e72-834c-efdc359dcb38","html_url":"https://github.com/bencsikandrei/lua-cmake","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bencsikandrei/lua-cmake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencsikandrei%2Flua-cmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencsikandrei%2Flua-cmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencsikandrei%2Flua-cmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencsikandrei%2Flua-cmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bencsikandrei","download_url":"https://codeload.github.com/bencsikandrei/lua-cmake/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencsikandrei%2Flua-cmake/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006257,"owners_count":26084060,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","cmake","lua"],"created_at":"2025-04-13T23:28:13.968Z","updated_at":"2025-10-11T04:08:02.713Z","avatar_url":"https://github.com/bencsikandrei.png","language":"CMake","readme":"# Lua - built with CMake\n\nBuild lua using CMake.\n\n*Note* This is the result of my search for a good CMake build for lua. Wanted something automated, something easy to use, easy to install, etc... I haven't found one. Took ideas from a bunch of places and I hope I mentioned all of them.\n\nThe minimum requirements for this projects are:\n\n1) a C (or C++) compiler which supports C99 and C++98\n2) CMake \u003e= 3.10\n3) a build tool (eg.: make, ninja, ...)\n\n## Building it\n\nTo build Lua, we first download it from the official FTP.\nThe supported version, for now, is only 5.3.5. Can easily be extended.\n\nThe build script downloads the sources for you and then uses those to create the lua library (or tools).\n\nThe example is for *nix based systems, but can be extended:\n\n```sh\n# in the root\nmkdir build \u0026\u0026 cd build\ncmake -Bbuild -S. # change the generator at will, say `-GNinja`\ncmake --build build --target all\n\n# when done you can install it\ncmake --build build --target install # will also make CMake config files\n```\n\n## Options\n\nWhen building you can make several packages by using the available options:\n\n`LUA_COMPILE_AS_CPP` will compile lua as a c++ library (for the implications of this, take a look at: http://lua-users.org/wiki/BuildingLua)\n\n`LUA_SKIP_TOOLS` skip `luac` and `lua` (default: ON)\n\n`LUA_PACKAGE_TEST` run a simple package test\n\n## Using it\n\nYou can add this as a subfolder, you can install it and use it via the `FindLua.cmake` that ships with cmake, of even set `Lua_ROOT` and use the `Lua-config.cmake` that this project creates.\n\nWhen using it as a subproject or with `find_package(Lua CONFIG)` you also get `Lua::lua` as a target to link to. Otherwise, for portability, use: `LUA_LIBRARIES` and `LUA_INCLUDE_DIR`.\n\n## CMake files\n\nWhen installing the project we also create Lua-config.cmake for `CONFIG` based `find_package`.\n\n## Inspired from\n\nhttps://github.com/ThePhD/sol2\nhttps://github.com/conan-io/conan-center-index/tree/master/recipes/lua\nhttps://raw.githubusercontent.com/microsoft/vcpkg/master/ports/lua/CMakeLists.txt\n\n## TODO\n\n1) Provide multiple versions of Lua\n2) Set the version of Lua (also, on linux set the .so version with that)\n3) Add a CI\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencsikandrei%2Flua-cmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbencsikandrei%2Flua-cmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencsikandrei%2Flua-cmake/lists"}