From BlenderWiki
Building Blender From Sources
There are two main tools that can be used to build Blender: SCons and CMake.
Below you can find guides how to compile Blender on the different platforms.
IDE Quick-Start Links
Once you have blender building you may want to develop one one of the many IDE's (or editors) that can be used with blender.
Since there are too many OS/IDE combinations, maintaining a comprehensive list of all would be difficult, so here are a list of documented configurations known to work well.
- OSX / CMake / XCode (TODO)
- Windows / CMake / MSVC2008 (TODO)
note:
- These docs assume you have blender already building.
- Some of these pages can be easily used between different operating systems.
Differences between SCons & CMake
Since we have two build systems here is some information about both to help you make a decision about which one to use.
SCons
- One step to configure/build/install - least hassle initially but slows down rebuilds.
- Note: scons has a BF_QUICK option to only rebuild specific modules which helps for faster rebuilds, however this needs to be used with care since it can result in invalid builds .
- Bundled with blender in the scons/ directory, you only need python2 to run it.
- does not auto-detect libs - this is not a problem on Windows or OSX but for linux if a library such as OpenEXR is missing, the build will fail, the library must be installed or SCons configured to disable it.
- no integration with any IDE's, SCons can still be called from an IDE, but it has no project file generation as with CMake, so the IDE won't have any defines or include paths from the build-system.
- configured by editing a python script 'user-config.py' or passing command line options.
- used for official builds and by blender.org buildbot.
CMake
- splits configuration/building/installing into 3 separate steps.
- Note: this may be better or worse depending on your point of view. More steps is more of a hassle initially, on the other hand configuring and copying files every time as SCons does, considerably slows down rebuilds.
- Linux/Unix Only - we have a convenience makefile so you can build by simply typing 'make' to build in 1 step as with SCons.
- Is an extra dependency and not included with blender.
- Libraries are auto detected, if a library is missing the feature will report as disabled but building will continue. *(not so much an issue on Win/OSX which use pre-compiled libraries).
- IDE integration
Blender/CMake project files have been tested to work in MSVC, Eclipse, KDevelop, Netbeans, Code::Blocks and QtCreator. - configured with a graphical tool, by editing CMakeCache.txt or command line arguments.
Notes
- CMake is not in fact a build system, but generates files for other build systems (a meta-build system).
- CMake project files on windows are know not to correctly rebuild (occasionally), this glitch needs to be investigated.
- Some of the differences listed are not inherent to either build system, just the way we have them configured in blender.
- There are longer comparisons between the 2 you can find online but for the purpose of building blender these are the main differences.