Skip to content

Setup: Linux

Taylor Snead edited this page Feb 21, 2014 · 4 revisions

Prerequisites

  • CMake
  • GCC and/or Clang
  • Gtk 3/2 development package (if you want to build the editor)

Building

Using $HOME/code/lfant as an example lfant directory, run the following (changing x86 to x64 if desired):

cd $HOME/code/lfant/bin/x86/linux
mkdir build
cd build
cmake ../../../.. -DARCH=x86 -DCOMPILER=clang -DEDITOR=OFF
make

Creating a project

cd $HOME/code/lfant
./new-project.sh $HOME/code myProject MyProject

The first parameter is the directory to put the project's folder. The second is the folder name, and the third is the project title, used for class naming. Building works the same way as lfant:

cd $HOME/code/myProject/bin/x86/linux
mkdir build
cd build
cmake ../../../.. -DARCH=x86 -DCOMPILER=clang
make

For an IDE/editor, I like to use KDevelop or Qt Creator. Both of those IDEs support direct usage of a CMakeLists.txt file for a project, making it really easy initial setup.

Clone this wiki locally