]> git.mxchange.org Git - flightgear.git/blobdiff - README.cmake
Remove automake ignores.
[flightgear.git] / README.cmake
index ede3b994ca66527fbf7323e980d269ebffca4d12..c74b4a5582e8a848619f07fd2846007bec3c3f33 100644 (file)
@@ -20,9 +20,19 @@ Note the install prefix is automatically searched for required libraries
 and header files, so if you install PLIB, OpenSceneGraph and SimGear to the
 same prefix, most configuration options are unnecessary.
 
 and header files, so if you install PLIB, OpenSceneGraph and SimGear to the
 same prefix, most configuration options are unnecessary.
 
-To specify that a particular dependency is in a non-standard location, most
-libraries support an environment variable - eg PLIBDIR or OSG_ROOT - to
-allow precise selection.
+If for some reason you have a dependency (or several) at a different prefix,
+you can specify one or more via CMAKE_PREFIX_PATH:
+
+    cmake ../flightgear -DCMAKE_PREFIX_PATH="/opt/local;/opt/fgfs"
+
+(note the use of semi-colons to specify multiple prefix paths)
+
+Standard prefixes are searched automatically (/usr, /usr/local, /opt/local)
+
+Most dependencies also expose an environment variable to specify their
+installation directory explicitly eg OSG_DIR or PLIBDIR. Any of the methods
+described above will work, but specifying an INSTALL_PREFIX or PREFIX_PATH is
+usually simpler.
 
 By default, we select a release build. To create a debug build, use
 
 
 By default, we select a release build. To create a debug build, use
 
@@ -34,7 +44,8 @@ Debug builds will automatically use corresponding debug builds of required
 libraries, if they are available. For example you can install debug builds of
 SimGear and OpenSceneGraph, and a debug FlightGear build will use them.
 
 libraries, if they are available. For example you can install debug builds of
 SimGear and OpenSceneGraph, and a debug FlightGear build will use them.
 
-(Debug builds of libraries have the 'd' suffix by default)
+(Debug builds of libraries have the 'd' suffix by default - Release builds
+have no additional suffix)
 
 Note most IDE projects (eg Xcode and Visual Studio) support building all the
 build types from the same project, so you can omit the CMAKE_BUILD_TYPE option
 
 Note most IDE projects (eg Xcode and Visual Studio) support building all the
 build types from the same project, so you can omit the CMAKE_BUILD_TYPE option
@@ -51,11 +62,19 @@ configurations, eg
 
 To set an optional feature, do
 
 
 To set an optional feature, do
 
-    cmake ../flightgear -DFEATURE_NAME=ON
+    cmake ../flightgear -DFEATURE_NAME=ON 
+
+(or 'OFF' to disable )
 
 
-The easiest way to see the features that can be configured, is by running one
-of the cmake GUIs - either ncurses or graphical. You can also check the root
-CMakeLists.txt file.
+To see the variables that can be configured / are currently defined, you can
+run one of the GUI front ends, or the following command:
+
+    cmake ../flighgear -L
+
+Add 'A' to see all the options (including advanced options), or 'H' to see
+the help for each option (similar to running configure --help under autoconf):
+
+    cmake ../flightgear -LH
 
 Build Targets
 
 
 Build Targets
 
@@ -100,8 +119,9 @@ You can set a property on an individual source file:
 Detecting Features / Libraries
 
 For most standard libraries (Gtk, wxWidget, Python, GDAL, Qt, libXml, Boost),
 Detecting Features / Libraries
 
 For most standard libraries (Gtk, wxWidget, Python, GDAL, Qt, libXml, Boost),
-cmake provides a standard helper. Check your cmake 'modules' directory to see
-the extensive list. 
+cmake provides a standard helper. To see the available modules, run:
+
+     cmake --help-module-list
 
 In the root CMakeLists file, use a statement like:
 
 
 In the root CMakeLists file, use a statement like:
 
@@ -113,7 +133,8 @@ might have different names (eg, OPENSCENEGRAPH_LIBRARIES).
 
 If there's no standard helper for a library you need, find a similar one, copy
 it to CMakeModules/FindABC.cmake, and modify the code to fit. Generally this
 
 If there's no standard helper for a library you need, find a similar one, copy
 it to CMakeModules/FindABC.cmake, and modify the code to fit. Generally this
-is pretty straightforward.
+is pretty straightforward. The built-in modules reside in the Cmake 'share'
+directory, eg /usr/share/cmake/modules on Unix systems.
 
 Note libraries support by pkg-config can be handled directly, with no need
 to create a custom FindABC helper.
 
 Note libraries support by pkg-config can be handled directly, with no need
 to create a custom FindABC helper.