https://github.com/osch/luarocks-build-extended
A fork of Luarock's built-in build system. (see: https://github.com/osch/luarocks-build-extended#luarocks-build-extended)
https://github.com/osch/luarocks-build-extended
lua luarocks
Last synced: 11 months ago
JSON representation
A fork of Luarock's built-in build system. (see: https://github.com/osch/luarocks-build-extended#luarocks-build-extended)
- Host: GitHub
- URL: https://github.com/osch/luarocks-build-extended
- Owner: osch
- License: other
- Created: 2019-12-12T19:03:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-07T19:24:49.000Z (about 6 years ago)
- Last Synced: 2025-01-17T20:13:18.402Z (about 1 year ago)
- Topics: lua, luarocks
- Language: Lua
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# luarocks-build-extended
[](LICENSE)
[](https://travis-ci.com/osch/luarocks-build-extended)
[](https://ci.appveyor.com/project/osch/luarocks-build-extended/branch/master)
[](https://luarocks.org/modules/osch/luarocks-build-extended)
A fork of Luarocks built-in build system.
Specify `"extended"` as build type and `"luarocks-build-extended"` as dependency to use it (see example below).
* Support for compiling C++ sources, similar to [luarocks-build-cpp].
C++ files are detected by file extensions (`.cpp`, `.cxx` or `.cc`)
For C++ compiling g++ is not used, gcc with stdc++ library is.
* Support for module specific variables (see also https://github.com/luarocks/luarocks/pull/368
or https://github.com/luarocks/luarocks/issues/367):
* CFLAG_EXTRAS list of additional C compiler arguments
* CXXFLAG_EXTRAS list of additional C++ compiler arguments
* LIBFLAG_EXTRAS list of additional linker arguments
* New variable BUILD_DATE contains build date in ISO-8601 format.
* Support for external_dependencies with the ability to disable
header search per platform, see also the
[example for installing LuaGL OpenGL binding](example/opengl-1.11-2.rockspec).
[luarocks-build-cpp]: https://luarocks.org/modules/osch/luarocks-build-cpp
## Example rockspec
```lua
package = "name"
version = "0.1-1"
source = {
url = "git://github.com/username/name.git"
}
description = {
summary = "...",
detailed = "...",
homepage = "http://github.com/username/name",
license = "MIT/X11"
}
dependencies = {
"lua >= 5.1, < 5.3",
"luarocks-build-extended"
}
build = {
type = "extended",
platforms = {
macosx = {
modules = {
name = {
variables = {
LIBFLAG_EXTRAS = {
"-framework", "Cocoa"
}
}
}
}
}
},
modules = {
name = {
sources = {
"name.cpp",
"aux.cpp"
},
defines = {
"MY_BUILD_DATE=$(BUILD_DATE)"
},
}
}
}
```
See also the [real world example](example/opengl-1.11-2.rockspec)
for installing Lua OpenGL binding.