Login
or
register
LuaRocks
Versioned Components For Lua
Overview
Home Page
Mailing list
Browse rocks
Links
Download
Download
Installing on Unix
Installing on Windows
Release history
License
Documentation
Documentation
File formats
Development
Feedback
Platform-agnostic external dependencies
Anonymous users must enter
captcha
below.
Don't put anything here
Don't put anything here
Don't put anything here
Page Parameters
Page Name (for URL)
Page Title
Show Advanced Options
Don't put anything here
Category
Don't put anything here
Prototype
Page Content
Since 0.6, LuaRocks supports specifying files for external dependency search in a platform-agnostic way. When filenames given in the '''external_dependencies''' section of a [[Rockspec format|rockspec]] don't have any dot (".") characters, their contents are substituted according to the patterns given in the '''external_deps_patterns''' table of the [[Config file format|configuration file]]. These patterns will typically not be used in the configuration file, as LuaRocks provides sensible defaults. The default patterns defined on Unix are: bin = {"?"} lib = {"lib?.a", "lib?.so"} include = {"?.h"} On Windows the defaults are: bin = {"?.exe", "?.bat"} lib = {"?.lib", "?.dll"} include = {"?.h"} For example, a [[Rockspec format|rockspec]] can define an external dependency like this: external_dependencies = { FOO = { library = "foo" } } and this will result in searches for libfoo.a or libfoo.so on Unix systems, and foo.lib or foo.dll on Windows. For entries that have more than one pattern, such as lib, only one entry needs to be satisfied. When performing external dependency checks during installation (as opposed to build) of rocks, static libraries and headers are not searched. The '''runtime_external_deps_patterns''' table is used instead. == When filenames don't match == If the pattern system is not enough to hide platform differences, you can always resort to [[Platform overrides|per-platform overrides]]. For example: external_dependencies = { FOO = { library = "foo" } platforms = { win32 = { FOO = { library = "winfoo32.dll" } } } } == Statically linked libraries and dependencies == If your rock links a library statically, avoid adding a library search in its [[Rockspec format|rockspec]]'s '''external_dependencies''' table. Search for a header instead, so that the external dependency search does not fail when users install a binary rock and they don't have the library installed separately.
About this Edit
Minor Edit
Edit Summary
Don't put anything here
Powered by
Sputnik
|
XHTML 1.1