Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

LuaDist: Manual Installation

drahosp edited this page Aug 12, 2011 · 3 revisions

Obtaining LuaDist

LuaDist project is not about the luadist deployment tool but about the packages. Every package in LuaDist Repository can be built manually without the deployment tool, provided you supply all the dependencies mentioned in dist.info. The following example should illustrate basic use of dists outside of the luadist project.

Requirements are: CMake 2.8+, C/C++ compiler (gcc, mingw, intel
etc), make or any CMake supported IDE.

Example: Building lua-5.1.4

First download lua-5.1.4 from the GitHub downloads page. Alternatively check it out as usual using git. Unpack the package and enter its directory so you see CMakeLists.txt and dist.info files.

In order to keep the source clean we will prepare a build directory, this practice is known as out of source build:

 > mkdir _build
 > cd _build

Now CMake can be used to generate make/nmake or IDE project files (check cmake --help listing an its -G options available on your system). Additional variables can be set to control the build, for example we want to install into ../_install directory.

Building on unix/linux/cygwin/osx:

 > cmake .. -DCMAKE_INSTALL_PREFIX=../_install - 
DCMAKE_BUILD_TYPE=Release
 > cmake --build . --target install

Building on Windows (start from initialized compiler environment):

 > cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=../_install -DCMAKE_BUILD_TYPE=Debug
 > cmake --build . --target install

Building on Windows using MinGW (recommended)

 > cmake .. -G "MinGW Makefiles"
 > cmake --build . --target install

Generally CMake builds are very flexible and many aspects of the build can be configured using the -D[CMAKE_VARIABLE] syntax. Alternatively you can use ccmake/cmake-gui instead of cmake that allows you to interactively set any other variables of the build.