-
Notifications
You must be signed in to change notification settings - Fork 17
How Lake finds Lua
The predefined need 'lua' is for programs and shared libraries that need to link against Lua.
If luarocks is installed on your machine, then it will query luarocks' LUA_INCDIR
and LUA_LIBDIR
.
The 'canonical' Lua install on Unix machines is for lua.h
to be on the usual include path. On Debian/Ubuntu, this isn't so because multiple versions of Lua are supported - there the path will be /usr/local/lua5.1
and the headers are provided by the liblua5.1-0-dev
package. If none of these apply, then set the global LUA_INCLUDE_DIR
.
Windows is always ... different. If the environment variable LUA_DEV
is defined then this is Lua for Windows. This results in linking against the old MSVC 2005 runtime if using mingw (fortunately, LfW is due for replacement with a much more sensible mingw distribution based on LuaDist). From the location of the Lua executable, Lake uses a heuristic search for the include
directory as a subfolder or parallel folder of this location. When using mingw it will link directly against the lua5.1.dll
that will be in the executable directory, otherwise it needs to find the lib
directory in the same way.