Building FlightGear - Debian: Difference between revisions

m
OSG cmake build options
(Reviewed for upcoming releases of FG 2.2.0 and Debian Squeeze)
m (OSG cmake build options)
Line 13: Line 13:
*gcc, g++, make, automake1.9, pkg-config
*gcc, g++, make, automake1.9, pkg-config
*mawk (or gawk)
*mawk (or gawk)
*cmake  (min. version 2.6.0-5, for Etch available on backports.debian.org!)
*cmake  (min. version 2.6.0-5)
*git, subversion, wget
*git, subversion, wget
*freeglut3-dev, libgl1-mesa-dev, libxrandr-dev
*freeglut3-dev, libgl1-mesa-dev, libxrandr-dev
Line 26: Line 26:
== Build and install ==
== Build and install ==
Because we are going to install versions different to the ones in the repositries it is recommended to install FG-2.2.0 and/or GIT in a place independent to the base system such as /usr/local/FG-2.2.0, /opt/FG-2.2.0 or in a subdirectory of your $HOME. I suggest to make it writeable by the user that there is no need to become root for the <code>make install</code> commands. I'll use <code>$prefix</code> as a placeholder for this directory. <BR>
Because we are going to install versions different to the ones in the repositries it is recommended to install FG-2.2.0 and/or GIT in a place independent to the base system such as /usr/local/FG-2.2.0, /opt/FG-2.2.0 or in a subdirectory of your $HOME. I suggest to make it writeable by the user that there is no need to become root for the <code>make install</code> commands. I'll use <code>$prefix</code> as a placeholder for this directory. <BR>
Another one will be <code>$srcdir</code>, it stands for the absolute path to the directory which contains the folders of the various source codes. So in the following instructions you have to replace these with the local paths or even <code>export</code> them during the process.
Another one will be <code>$srcdir</code>, it stands for the absolute path to the directory which is supposed to keep the folders of the various source codes. So in the following instructions you have to replace these with the local paths or even <code>export</code> them during the process.


Follow the instructions to fetch the sources and the data needed by FlightGear and the commands to build/install each source.
Follow the instructions to fetch the sources and the data needed by FlightGear and the commands to build/install each source.
Line 69: Line 69:
<u>2.2.0 and GIT:</u>
<u>2.2.0 and GIT:</u>
  mkdir osg-build && cd osg-build
  mkdir osg-build && cd osg-build
  cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3" -D CMAKE_C_FLAGS="-O3" \
  cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $srcdir/OpenSceneGraph
    -D CMAKE_INSTALL_PREFIX:PATH="$prefix" $srcdir/OpenSceneGraph
  make install
  make install


392

edits