Building using CMake

From FlightGear wiki
Revision as of 22:43, 5 September 2011 by Zakalawe (talk | contribs)
Jump to navigation Jump to search

CMake generates build files for a variety of systems - you can choose whichever one you prefer, but the examples below are the most likely to work.

Building inside the source directory is strongly discouraged - create a build directory next to your source directory, and run Cmake from inside the build dir.

CMAKE_INSTALL_PREFIX specifies the location the compiled code will be installed to, but also adds library and header search paths. If you configure OpenSceneGraph, SimGear and FlightGear with the same value of CMAKE_INSTALL_PREFIX, most things will work automatically.

CMake includes CTest - depending on your build system, there should be a way to run the tests. Eg 'make test' for Unix Makefiles.

Linux / Unix

Install Boost, libpng, OpenAL, ALUT, PLIB

Default Cmake target is regular make. Do 'cmake, make, make install' for OpenSceneGraph, then SimGear, then FlightGear

set CMAKE_BUILD_TYPE = Debug or Release as desired.

Mac

(Installed XCode)

Install Boost, PLIB from Macports, Install James' ALUT framework

XCode

Basically the same as above! Don't need to set CMAKE_BUILD_TYPE, can be done inside XCode

Windows MSVC 2010

Get Fred's latest 3rd party zip

Set MSVC_3RDPARTY_DIR to point to the location of the extracted zip