Building using CMake: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Created page with "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 di...")
 
No edit summary
Line 4: Line 4:


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_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 ==
== Linux / Unix ==


Install Boost, libpng, OpenAL, ALUT
Install Boost, libpng, OpenAL, ALUT, PLIB


Default Cmake target is regular make. Do 'cmake, make, make install' for OpenSceneGraph, then SimGear, then FlightGear
Default Cmake target is regular make. Do 'cmake, make, make install' for OpenSceneGraph, then SimGear, then FlightGear
Line 17: Line 19:
(Installed XCode)
(Installed XCode)


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


Line 27: Line 29:


Get Fred's latest 3rd party zip
Get Fred's latest 3rd party zip
Set MSVC_3RDPARTY_DIR to point to the location of the extracted zip

Revision as of 22:43, 5 September 2011

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