On Thu, Nov 15, 2012 at 7:53 PM, Ignacio Burgueño <[email protected]> wrote:
> Hi. I'd like to provide a rockspec file for lua-zip [1]. Since it uses CMake
> to compile, I'd like to reuse as much of that as possible. Is there any good
> examples of how to build with CMake using LuaRocks?
>
> Which variables I should pass from LR to CMake (like install destination and
> so on).
The only rockspec currently using the cmake mode in the main repo is
lua-http-parser-1.0-1 [2]. That could probably serve as a template,
but I don't know if all cmake-based builds use the same variable
names. If this [3] is the lua-zip you're referring to (a single C
file) then maybe writing a 'builtin' rockspec would end up being
simpler and require less dependencies. If I'm reading the
CMakeLists.txt file correctly, the relevant part would look something
like
external_dependencies = {
ZIP = {
header = "zip.h",
library = "zip",
}
}
build = {
type = "builtin",
modules = {
["brimworks.zip"] = {
sources = { "lua_zip.c" },
incdirs = { "$(ZIP_INCDIR)" },
libdirs = { "$(ZIP_LIBDIR)" },
libraries = { "zip" },
}
}
}
(The above was a handwritten find-and-replace from the midialsa rockspec :) )
[1] missing link? :)
[2] http://luarocks.org/repositories/rocks/lua-http-parser-1.0-1.rockspec
[3] https://github.com/brimworks/lua-zip
-- Hisham
http://hisham.hm/
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers