open_toontown_panda3d/cmake
Sam Edwards 81f0fb78f2 CMake: Fix Interrogate macro not working on Windows
This was broken by 2d5bdb3515,
which wrote -D flags as -D'symbol' -- this choked Windows,
so this commit turns it off in that case.

It's a shame there's no generator expression to escape quotes,
otherwise this hack wouldn't even be needed.
2019-06-03 22:02:54 -06:00
..
install CMake: Neatly format everything for readability and consistency 2019-04-14 22:37:18 -06:00
macros CMake: Fix Interrogate macro not working on Windows 2019-06-03 22:02:54 -06:00
modules CMake: Add support for building against FCollada 2019-03-18 01:56:38 -06:00
scripts CMake: Fix the ConcatenateToCXX script leaving off a null byte 2019-06-02 01:37:43 -06:00
templates CMake: Restructure multi-configuration binary directory layout 2019-05-01 23:44:47 -06:00
README.md CMake: Update some of the cmake/* docs 2019-04-14 20:03:18 -06:00

README.md

Building with CMake

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

mkdir build && cd build
cmake ..
make
[sudo] make install

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 their historical names (same names as in-source):

	# Examples
	PANDA_DISTRIBUTOR="MyDistributor"
	LINMATH_ALIGN=On

	# ... etc ...

For example, makepanda.py --distributor X becomes cmake -DPANDA_DISTRIBUTOR=X

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.

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.

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).