User:Daemonburrito/Building FlightGear - Linux: Difference between revisions

Jump to navigation Jump to search
→‎Compiling: Out-of-source explanation and link to cmake wiki.
(→‎Compiling: Out-of-source explanation and link to cmake wiki.)
Line 1: Line 1:
== Compiling ==
== Compiling ==


When tracking a fast changing software like FlightGear/Git it is highly advisable to install it in a separate directory. That way one can also easily build and reinstall without being root, which greatly reduces the risk of messing up one's system.
Flightgear, Simgear, and OpenSceneGraph now use <tt>cmake</tt>. See the [http://www.cmake.org/Wiki/CMake_Useful_Variables CMake wiki] for additional documentation.


To install in a directory of your choice, add the <code>CMAKE_INSTALL_PREFIX</code> argument to <code>cmake</code>. E.g., <code>-DCMAKE_INSTALL_PREFIX==/path/to/your/fgInstallation</code>. I would recommend installing all of OSG, plib, SimGear and FlightGear with the same prefix.
CMake allows users to create "out-of-source" builds, which means build files are created in a separate directory, and many variants can be maintained. To use out-of-source builds, simply create a new directory and pass the path to source to <code>cmake</code>.
 
=== Example "out-of-source" build with CMake ===
 
<syntaxhighlight lang="bash">
simgear $ mkdir ../build.simgear
simgear $ cd ../build.simgear
build.simgear $ cmake ../simgear
</syntaxhighlight>
 
After CMake has run, you can <code>make && make install</code>.


=== Getting and compiling SimGear ===
=== Getting and compiling SimGear ===

Navigation menu