Page tree
Skip to end of metadata
Go to start of metadata


There are different prep-scripts:

  • prep20xx.cmd - Generate Visual Studio Project (2005 for VS2005, etc.)
  • prep2010x64.cmd- Generate Visual Studio Project for a 64 bit build
    • Please note that you probably don't want to use this! Very very few people actually want a 64 bit plugin build.
  • - Generate Xcode Project on Mac
  • - CodeBlocks Project
  • - Eclipse Project
  • - Make based build


prepXXX [<project dir> [<build dir>]] [<params ...>]

  • <project dir> defaults to projects/, use examples for the examples
  • <build dir> defaults to buildex for the examples, build otherwise.  This sets where CMake will "build" the project.
  • <params> are cmake parameters (like the ones below). On windows, you may need to surround each with double-quotes (")

Note: There are problems with symlinks due to CMakes handling of paths.

General params

  • -D VERBOSE=1 - cmake build scripts are less verbose unless -DVERBOSE=1 is specified
  • -D WITH_SYSTEM_BOOST=1 - use system boost headers/libs instead of those provided by FB
  • -D CMAKE_BUILD_TYPE="<type>" - Debug, Release, MinSizeRel,RelWithDebInfo (can alternatively be set in IDE except when using makefiles)
  • -D FB_OPTIMIZE="(size|speed)" - Make both general Release configurations (Release and RelWithDebInfo) optimize for either speed or size. (Currently this is windows only, but plans exist to make it cross platform)

External Boost

If boost was installed in a separate directory:

  • -D BOOST_ROOT="/path/to/boost" - set to path to your Boost installation
  • -D Boost_ADDITIONAL_VERSIONS="<versions>" - set specific Boost version (e.g. "1.43;1.43.0")
  • -D Boost_USE_STATIC_LIBS=on
  • -D Boost_USE_STATIC_RUNTIME=on should be used in windows to force linking to the boost libraries built with /MT(d).

Note: These all require -DWITH_SYSTEM_BOOST=1 and changing these params requires deleting <build dir> before running prep script for changes to take effect.
You must compile Boost, before you regenerate your project. Keep in mind to add any additional Boost libraries you use, as is described in Using Libraries.

To compile Boost in 32/64-bit versions on Mac OS X use something like: ./b2 -a -q link=static threading=multi toolset=clang-darwin cxxflags="-arch i386 -arch x86_64" macosx-version=10.6 stage

Windows params

  • -D WITH_DYNAMIC_MSVC_RUNTIME=1 - use dynamic VC runtime

Mac params

  • -D CMAKE_OSX_ARCHITECTURES="<arch>" - Set the architecture: "i386", "x86_64", "i386;x86_64", ... (can alternatively be set in IDE)
  • -D CMAKE_OSX_SYSROOT="/path/to/sdk" - Set the sysroot (e.g. "/Developer/SDKs/MacOSX10.5.sdk")
    1. On Xcode4 the SDKs are located under "/Applications/"
    2. For example: to set the path for the 10.8 SDK use the path "/Applications/"
  • -D CMAKE_OSX_DEPLOYMENT_TARGET=10.6 - Set the desired target version of Mac OS X
  • No labels