Example of CMake with luarocks?

classic Classic list List threaded Threaded
5 messages Options
v
Reply | Threaded
Open this post in threaded view
|

Example of CMake with luarocks?

v
I want to make Lua bindings to my C++ library. Thing is that luarocks'
built-in build system doesn't play well with C++ in general and
especially with C++17, so I want to use CMake instead. Also, my library
already have CMake package, so it plays with it very well.

However, it seems that whole idea is pretty complicated due to fact
that luarocks does not export any helpful variables to CMake, like
library destination directory, or Lua include directory.

Have anyone used luarocks with CMake build system on practice? How were
problems listed by me solved? Thanks in advance.

--
v <[hidden email]>


Reply | Threaded
Open this post in threaded view
|

Re: Example of CMake with luarocks?

Peter Aronoff
v <[hidden email]> wrote:
> Have anyone used luarocks with CMake build system on practice? How were
> problems listed by me solved? Thanks in advance.

I don’t use CMake myself, but I know of one large project that uses CMake,
lua, and luarocks: neovim. You might find their build helpful to examine.

https://github.com/neovim/neovim

Best, P

--
We have not been faced with the need to satisfy someone else's
requirements, and for this freedom we are grateful.
    Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System

v
Reply | Threaded
Open this post in threaded view
|

Re: Example of CMake with luarocks?

v
On Sat, 2019-08-17 at 13:06 -0400, Peter Aronoff wrote:
> I don’t use CMake myself, but I know of one large project that uses
> CMake,
> lua, and luarocks: neovim. You might find their build helpful to
> examine.

Thank you. Sadly, it seems to do nothing with what I want to do. It
uses CMake, but I'm interested in using to create luarock which use
CMake at its build system. As for including Lua from CMake, I have done
that many times.

--
v <[hidden email]>


Reply | Threaded
Open this post in threaded view
|

Re: Example of CMake with luarocks?

Pierre Chapuis
In reply to this post by v
v
Reply | Threaded
Open this post in threaded view
|

Re: Example of CMake with luarocks?

v
On Sat, 2019-08-17 at 21:41 +0200, Pierre Chapuis wrote:
> There are several rockspecs using the cmake build type in the repo,
> for instance:
>
> - https://luarocks.org/manifests/creationix/luv-1.30.1-0.rockspec
> -
> https://luarocks.org/manifests/gforge/torch-dir-loader-0.6-0.rockspec
> - https://luarocks.org/manifests/xpol/rapidjson-0.6.1-1.rockspec
>

Wow, thanks a lot. Looks very helpful!

--
v <[hidden email]>