From 8d3e7541ef854200426c42810c79178e6cacb0a4 Mon Sep 17 00:00:00 2001 From: kestred Date: Thu, 30 Jan 2014 05:06:11 -0700 Subject: [PATCH] Update documentation for CMake build system. --- cmake/README.md | 34 +++++++++++++++++----------------- cmake/TODO | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cmake/README.md b/cmake/README.md index 5b46309b87..a632418ff5 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -8,7 +8,7 @@ make [sudo] make install ``` -It is recommended to create a separate directory to build Panda3D: +Instead, it is recommended to create a separate directory to build Panda3D: ```sh mkdir build cd build/ @@ -28,11 +28,10 @@ Panda subpackage building is handled by: ``` BUILD_=True/False # Example: BUILD_DTOOL, BUILD_PANDA ``` -Other configuration settings use more direct names (same names as in-source): +Other configuration settings use their historical names (same names as in-source): ``` # Examples PANDA_DISTRIBUTOR="MyDistributor" - DTOOL_INSTALL="/usr/local/panda" LINMATH_ALIGN=On # ... etc ... @@ -41,19 +40,20 @@ Other configuration settings use more direct names (same names as in-source): For example, `makepanda.py --distributor X` becomes `cmake -DPANDA_DISTRIBUTOR=X` -All third-party libraries are enabled by default and Panda3D will -be compiled with any third-party library that is found. -Third-party libraries can be enabled or disabled through -configuration with the cmake gui or cli. +All found third-party libraries are enabled by default. +Most config settings are set to a sensible default for typical +a PC/desktop Panda3D distribution. +Third-party libraries and other settings can be enabled or disabled +through configuration with the cmake gui or cli. -To quickly enable or disable all third-party libraries, run: -```sh -cmake -DEVERYTHING=True . # or .. if you are in a separate build/ dir -# OR -cmake -DNOTHING=True . # or .. if you are in a separate build/ dir -``` +Running Panda3D with `-DCMAKE_BUILD_TYPE=` and one of `Release`, `Debug`, +`MinSizeRel`, or `RelWithDebInfo` will cause some configuration settings +to change their defaults to more appropriate values. -To use all available packages, and silence output for missing packages, run: -```sh -cmake -DDISCOVERED=True . # or .. if you are in a separate build/ dir -``` +If cmake has already been generated, changing the build type will not cause +some of these values to change to their expected values, because the values +are cached so that they don't overwrite custom settings. + +To reset CMake's config to defaults, delete the CMakeCache.txt file, and rerun +CMake with the preferred build mode specified +(example: `cmake .. -DCMAKE_BUILD_TYPE=Debug`). diff --git a/cmake/TODO b/cmake/TODO index d612816b78..8a57cd4ea8 100644 --- a/cmake/TODO +++ b/cmake/TODO @@ -1,4 +1,4 @@ # List of things which may appear done but actually still need work! Test Miles Sound System support Add DirectX support for Nvidia Cg - +Finish Config.pp conversion to Config.cmake