[OpenWrt-Devel] liblua vs. CMake

Karl Palsson karlp at tweak.net.au
Fri Sep 14 08:30:58 EDT 2018

Welcome to the joys of lua's packaging, not just in OpenWrt, but
across the bsds and desktop distros as well.

You need "lua" to find it for OpenWrt. (There will be only one
lua) On ~most recent distros, as you may have noticed, this will
however be lua 5.2 or 5.3. On those distros you need "lua5.1, or
lua-5.1 or lua51 to find it, if it's supported at all.

It _might_ be nice if OpenWrt moved everything to versioned lua
installs, it would reduce the patches on quite a lot of packages,
and pave the way for having two versions of lua installed, but
that's "not happening" anytime soon. In the meantime, you're
going to have a bit of a mess of "if it's openwrt, look for lua,
if not, look for lua-5.1 and friends"

Hope that helps,
Karl P

Lev <leventelist at gmail.com> wrote:
> Hello list,
> I'm still struggling finding liblua in the build system by
> CMake.
> This is a simple executable project and I have this at the top
> of the CMakeLists.txt file:
> cmake_minimum_required (VERSION 3.0)
> project(hmd C)
> 	INCLUDE(FindPkgConfig)
> 	pkg_search_module(LUA lua5.1 lua-5.1)
> 	message("Lua found cflags: ${LUA_CFLAGS}")
> As the build system configures my project, the LUA_CFLAGS gets
> empty. I've seen this snippet in libubox as suggested earlier.
> What I don't really understand, how could this even work? If i
> grep for a file lua5.1.pc or lua-5.1.pc, there is none. What is
> present is lua.pc.
> The difference between libubox and my application is mine is
> just a simple executable, libubox is a library.
> What do I miss?
> Thanks,
> Levente
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.html
Type: application/pgp-signature
Size: 1161 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180914/e73bde5e/attachment.sig>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list