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.
prepmac.sh- Generate Xcode Project on Mac
prepcodeblocks.sh- CodeBlocks Project
prepeclipse.sh- Eclipse Project
prepmake.sh- Make based build
prepXXX [<project dir> [<build dir>]] [<params ...>]
<project dir>defaults to
examplesfor the examples
<build dir>defaults to
buildexfor the examples,
buildotherwise. 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.
-D VERBOSE=1- cmake build scripts are less verbose unless
-D WITH_SYSTEM_BOOST=1- use system boost headers/libs instead of those provided by FB
MinSizeRel,RelWithDebInfo(can alternatively be set in IDE except when using makefiles)
- 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)
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.
-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
-D WITH_DYNAMIC_MSVC_RUNTIME=1- use dynamic VC runtime
-D CMAKE_OSX_ARCHITECTURES="<arch>" - Set the architecture:
"i386;x86_64", ... (can alternatively be set in IDE)
-D CMAKE_OSX_SYSROOT="/path/to/sdk" - Set the sysroot (e.g.
- On Xcode4 the SDKs are located under "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs"
- For example: to set the path for the 10.8 SDK use the path "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"
-D CMAKE_OSX_DEPLOYMENT_TARGET=10.6- Set the desired target version of Mac OS X