CMake: update cmake.txt documentation to remove some old information and link

to the wiki for detailed cmake build setup instructions.
This commit is contained in:
Brecht Van Lommel
2013-02-26 00:49:45 +00:00
parent 4643d61ffb
commit 10f2ad1663

View File

@@ -7,12 +7,9 @@
1. Introduction
2. Obtaining CMake
3. Obtaining Dependencies
4. Deciding on a Build Environment
5. Configuring the build for the first time
6. Configuring the build after SVN updates
7. Specify alternate Python library versions and locations
3. Building Blender
4. Generic Setup
5. Configuring the build after SVN updates
1. Introduction
---------------
@@ -28,36 +25,17 @@
The website also contains some documentation on CMake usage but I found
the man page alone pretty helpful.
3. Obtaining Dependencies
-------------------------
3. Building Blender
-------------------
Check from the page
http://www.blender.org/cms/Getting_Dependencies.135.0.html that you
have all dependencies needed for building Blender. Note that for
windows many of these dependencies already come in the lib/windows
module from SVN.
Building Blender requires obtaining a compiler, library dependencies,
and correct setup depending on the system. For details on how to set
up a build on various operating systems, see the wiki documentation:
4. Deciding on a Build Environment
----------------------------------
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender
To build Blender with the CMake scripts you first need to decide which
build environment you feel comfortable with. This decision will also be
influenced by the platform you are developing on. The current implementation
have been successfully used to generate build files for the following
environments:
1. Microsoft Visual Studio 2008. There is a free version available
at http://http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
2. Xcode on Mac OSX
3. Unix Makefiles (On Linux and Mac OSX): CMake actually creates make
files which generates nicely color coded output and a percentage
progress indicator.
5. Configuring the build for the first time
-------------------------------------------
4. Generic Setup
----------------
CMake allows one to generate the build project files and binary objects
outside the source tree which can be pretty handy in working and experimenting
@@ -113,42 +91,14 @@
It is also possible to use the commandline of 'cmake' to override certain
of these settings.
6. Configuring the build after SVN updates
5. Configuring the build after SVN updates
------------------------------------------
The $BLENDERBUILD directory maintains a file called CMakeCache.txt which
remembers the initial run's settings for subsequent generation runs. After
every SVN update it may be a good idea to rerun the generation before building
Blender again. Just rerun the original 'cmake' run to do this, the settings
will be remembered. For the example above the following will do after every
'svn up':
% cmake -G Xcode $BLENDERSOURCE
7. Specify alternate Python library versions and locations
----------------------------------------------------------
The commandline can be used to override detected/default settings, e.g:
On Unix:
cmake -D PYTHON_LIBRARY=/usr/local/lib/python3.2/config/libpython3.2.so -D PYTHON_INCLUDE_DIR=/usr/local/include/python3.2 ../blender
On Macs:
cmake -D PYTHON_INCLUDE_DIRS=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 -G Xcode ../blender
Mote that this should only be needed once per build directory generation because it will keep the overrides in CMakeCache.txt for subsequent runs.
To be continued...
TODO's
------
1. Get CMake to create proper distribution directories for the various platforms
like scons does.
2. Investigate the viability of using CPack to package installs automatically.
3. Refine this document and write detailed developer's document.
4. Make sure all options (ffmpeg, openexr, quicktime) has proper CMake support
on the various platforms.
SVN updates that contain changes to the build system, rebuilding Blender will
automatically invoke CMake to regenerate the CMakeCache.txt and other files
as needed.
/Jacques Beaurain (jbinto)