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 luarocks/luarocks#368
or luarocks/luarocks#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.
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 for installing Lua OpenGL binding.