From BlenderWiki

Jump to: navigation, search

User configurable compile time options

[edit] Config.opts user configuration file

When you look at a clean source tree you either get from downloading a source package, or from cvs, you'll see a SConstruct in the root of the blender tree. This file contains many settings which are necessary for the various supported platforms. It is very likely that these settings do not apply to your system or needs. For example, you may want to test out an optimization flag, enable or disable a blender feature or setup a location of a needed library. It is not recommended to adjust settings in the SConstruct file directly. If you want to update your source tree with the latest changes from cvs, you'll get conflicts in the SConstruct file. Especially for this, a feature has been added to allow you to change settings in a specific configuration file. The first time scons is started, the file config.opts is generated. The content of the config.opts file can be divided in five parts:

  • Features
  • Compiler information
  • Default Blender external library settings
  • Game engine specific external library settings
  • Internationalization specific external library settings

Each section below will describe the available options.


Some general remarks: The (#) character is used in directory settings as the location of where the SConstruct file is located. In our case this is the root of the Blender source tree. Almost all settings below are specified as strings. You need to mark them with single(') or double (") quotes. Library settings are all specified in lists of strings. A list is marked with ([) and (]) characters. Each string is separated with a comma (,). With a list you are allowed to specify multiple settings if that's necessary for that specific flag. The generated config.opts file most likely contains all of the above characters in some form.


[edit] Blender features

VERSION This specifies what the version of blender will be. This version could eventually be used for generating the blender package and can be displayed in the user interface. For now, it's not used.
BUILD_BINARY This specifies if you want to build a debug or a release version. Debug versions tend to be larger than release builds as they will contain more information. Unless you need to debug blender, you leave this field at 'release'.
USE_BUILDINFO If you set this field to 'true', you will get build information included in the blender splash screen. When enabled, there's always at least one file that needs to be recompiled, so it will decrease compilation performance.
BUILD_BLENDER_DYNAMIC For all platforms this should be set to 'true' otherwise you won't be getting a blender binary. The exception to the rule is the Linux platform. The dynamic linux version will generate a binary that uses hardware accellerated OpenGL.
BUILD_BLENDER_STATIC This flag only applies to the linux platform. If set to 'true' it will generate a blender binary which has the OpenGL libraries compiled in. This will result in a software OpenGL version.
BUILD_BLENDER_PLAYER Set this flag to 'true' if you want to compile the blenderplayer. Not implemented yet.
BUILD_BLENDER_PLUGIN Set this flag to 'true' if you want to compile the blenderplugin. Not implemented yet.
BUILD_DIR Set the root directory where intermediate output needs to be stored.
USE_INTERNATIONAL Set to 'true' if you want internationalization support in blender.
BUILD_GAMEENGINE Set to 'true' if you want to enable the game engine.
USE_PHYSICS This flag specifies which Physics should be used in the game engine. Valid options are: 'solid' and 'ode'.
USE_OPENAL Set to 'true' if you want to enable OpenAL support in the game engine. If you have disabled the game engine, it is advised to disable this flag aswell. It has no use in the rest of blender.
USE_FMOD Set to 'true' if you want to enable FMOD support in the game engine. Not yet implemented. Not even certain of the future of this feature.
USE_QUICKTIME Set to 'true' if you want support for QuickTime in blender. Currently only available for Windows and MacOS.

[edit] Compiler information

HOST_CC This flag specifies what C compiler on the host platform needs to be. This generally needs to be the same as TARGET_CC.
HOST_CXX This flag specifies what C++ compiler on the host platform needs to be. This generally needs to be the same as TARGET_CXX.
TARGET_CC This flag specifies what C compiler is used for the target platform.
TARGET_CXX This flag specifies what C++ compiler is used for the target platform.
TARGET_AR This flag specifies what ar tool is used for the target platform. Note, for the host platform we don't need ar.
PATH This flag specifies the search path for the tools.

[edit] Default Blender external library settings

PLATFORM_LIBS Specify specific libraries needed for correct linkage on your platform.
PLATFORM_LIBPATH Specify the libpaths where the libraries specified in PLATFORM_LIBS are located.
PLATFORM_LINKFLAGS Specify additional linkflags needed for correct linkage on your platform. Note: for MacOS, you can specify -framework flags here.
PYTHON_INCLUDE Specify the include path for the Python header files.
PYTHON_LIBPATH Specify the lib path for the Python library.
PYTHON_LIBRARY Specify the lib name (without extension) for the Python library.
PYTHON_LINKFLAGS Specify linkflags needed for correct linkage with the Python library.
SDL_CFLAGS Specify additional C flags for correct compilation when using SDL calls.
SDL_INCLUDE Specify the include path for the SDL header files.
SDL_LIBPATH Specify the lib path for the SDL library.
SDL_LIBRARY Specify the lib name (without extension) for the SDL library.
Z_INCLUDE Specify the include path for the Zlib header files.
Z_LIBPATH Specify the lib path for the Zlib library.
Z_LIBRARY Specify the lib name (without extension) for the Zlib library.
PNG_INCLUDE Specify the include path for the PNG header files.
PNG_LIBPATH Specify the lib path for the PNG library.
PNG_LIBRARY Specify the lib name (without extension) for the PNG library.
JPEG_INCLUDE Specify the include path for the JPEG header files.
JPEG_LIBPATH Specify the lib path for the JPEG library.
JPEG_LIBRARY Specify the lib name (without extension) for the JPEG library.
OPENGL_INCLUDE Specify the include path for the OpenGL header files.
OPENGL_LIBPATH Specify the lib path for the OpenGL libraries.
OPENGL_LIBRARY Specify the OpenGL libraries (without extension). Normally this flag should be: ['GL', 'GLU']
OPENGL_STATIC Specify the static version of the OpenGL libraries (Full path and with extension). Only applies to the Linux platform.


[edit] Game engine specific external library settings

SOLID_INCLUDE Specifies the include path for the Solid header files.
SOLID_LIBPATH Specifies the lib path for the Solid library.
SOLID_LIBRARY Specifies the lib name (without extension) for the Solid library.
QHULL_INCLUDE Specifies the include path for the QHull header files.
QHULL_LIBPATH Specifies the lib path for the QHull library.
QHULL_LIBRARY Specifies the lib name (without extension) for the QHull library.
ODE_INCLUDE Specifies the include path for the ODE header files.
ODE_LIBPATH Specifies the lib path for the ODE library.
ODE_LIBRARY Specifies the lib name (without extension) for the ODE library.
OPENAL_INCLUDE Specifies the include path for the OpenAL header files.
OPENAL_LIBPATH Specifies the lib path for the OpenAL library
OPENAL_LIBRARY Specifies the lib name (without extension) for the OpenAL library.


[edit] Internationalization specific external library settings

FTGL_INCLUDE Specify the include path for FTGL header files.
FTGL_LIBPATH Specify the lib path for the FTGL library.
FTGL_LIBRARY Specify the lib name (without extension) for the FTGL library.
FREETYPE_INCLUDE Specify the include path for FreeType2 header files.
FREETYPE_LIBPATH Specify the lib path for the FreeType2 library.
FREETYPE_LIBRARY Specify the lib name (without extension) for the FreeType2 library.
GETTEXT_INCLUDE Specify the include path for Gettext header files.
GETTEXT_LIBPATH Specify the lib path for the Gettext library.
GETTEXT_LIBRARY Specify the lib name (without extension) for the Gettext library.






Redirects to fix

  • Hackers Guide/Building → Dev:Doc/Hackers Guide/Building
  • Hackers Guide/Debugging → Dev:Doc/Hackers Guide/Debugging