open_toontown_panda3d/cmake
kestred 9dd82f90c2 cmake: Update readme to match current cmake variable naming scheme. 2013-12-21 19:45:12 -07:00
..
macros cmake: config: Move new package macros to cmake/macros, use new package macros in Package.cmake, begin removing redundant package/config options from Package.cmake (theses are being moved to Config.cmake). 2013-12-21 19:30:53 -07:00
modules cmake: Reorganize macros, and cleanup related files (add docs, etc) 2013-12-21 13:44:05 -07:00
scripts cmake: Reorganize macros, and cleanup related files (add docs, etc) 2013-12-21 13:44:05 -07:00
README.md cmake: Update readme to match current cmake variable naming scheme. 2013-12-21 19:45:12 -07:00
TODO CMake: Add a ToDo list for things that prone to being accidently forgotten. 2013-12-09 02:25:58 -07:00

README.md

Building with CMake

The quickest way to build and install panda with CMake is to run:

cmake .
make
[sudo] make install

It is recommended to create a separate directory to build Panda3D:

mkdir build
cd build/
cmake ..
make

To configure CMake, it is recommended to use cmake-gui (cmake-gui .), however it is also possible to configure it entirely through CMake's command-line interface; see man cmake for more details.

In general, the config variable for a particular third party library is:

	HAVE_<LIBRARY>=True/False   # Example: USE_JPEG

Panda subpackage building is handled by:

	BUILD_<SUBPACKAGE>=True/False   # Example: BUILD_DTOOL, BUILD_PANDA

Other configuration settings use more direct names (same names as in-source):

	# Examples
	PANDA_DISTRIBUTOR="MyDistributor"
	DTOOL_INSTALL="/usr/local/panda"
	LINMATH_ALIGN=On

	# ... etc ...

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.

To quickly enable or disable all third-party libraries, run:

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

To use all available packages, and silence output for missing packages, run:

cmake -DDISCOVERED=True .  # or .. if you are in a separate build/ dir