forked from opentibia/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Compiling OTServ under Linux systems
Hampus Joakim Nilsson edited this page Aug 3, 2012
·
1 revision
Needed packages:
- git
- cmake
- gcc
- boost library
- lua library
- gmp library
- libxml2 library
- luajit library (optional)
For instance, if you have Ubuntu or a Debian based distribution you can install all the required packages with these commands using apt-get:
sudo apt-get install build-essential cmake git-core
sudo apt-get install libboost-all-dev libgmp3-dev liblua5.1-dev libxml2-dev
git clone git://github.com/opentibia/server.git
cd server
First create a build directory
mkdir build
cd build
If don't want to supply any option, just run:
cmake ..
Otherwise you can supply some available options like USE_LUAJIT, USE_MYSQL, USE_SQLITE, USE_CPP11, USE_PCH. Example:
cmake .. -DUSE_LUAJIT=ON -DUSE_MYSQL=ON
If you do not have the libraries installed in the default locations, use -DCMAKE_INCLUDE_PATH=
and -DCMAKE_LIBRARY_PATH
to specify the search paths.
You can use cmake-gui to configure before bulding, you will be able to change and check build options in the interface.
cmake-gui ..
make
TIP: If you have multiple cores, use -j4 option to build using 4 cores.
cd ..
./build/otserv