-
Notifications
You must be signed in to change notification settings - Fork 59
Build instructions
- CMake
- Microsoft Visual C++ 2015-2017
Note that C++ build tools aren't installed for Visual Studio 2015 by default.
- Fetch Bullet and BulletSharp:
- git clone https://github.com/bulletphysics/bullet3
- git clone https://github.com/AndresTraks/BulletSharp
- Generate Bullet solution files with CMake-gui. Set the build directory to:
- bullet3/msvc/2015 for "Visual Studio 14 2015"
- bullet3/msvc/2017 for "Visual Studio 15 2017"
Set the USE_MSVC_RUNTIME_LIBRARY_DLL option. You can clear all BUILD_X options like BUILD_BULLET2_DEMOS, BUILD_CPU_DEMOS, etc., except BUILD_EXTRAS.
2a. Optional: to use double precision, select USE_DOUBLE_PRECISION in CMake, then go to BulletSharp/src/Stdaxh.h and uncomment the following line:
//#define BT_USE_DOUBLE_PRECISION
2b. Optional: to enable multi-threading, select BULLET2_MULTITHREADING, press "Configure" and then select one or more of BULLET2_USE_OPEN_MP_MULTITHREADING, BULLET2_USE_PPL_MULTITHREADING and BULLET2_USE_TBB_MULTITHREADING. MSVC supports OpenMP and PPL out-of-the-box.
-
Open bullet3/msvc/20xx/BULLET_PHYSICS.sln and build the Release configuration.
-
Open BulletSharp/BulletSharp.sln (or BulletSharp/(vs20xx/)BulletSharp.sln) and select the build configuration for your graphics framework. BulletSharp will use the Vector and Matrix classes from it. If the framework is not listed or you do not need one, then select the Generic configuration, which includes its own Vector/Matrix classes. You may need to adjust library paths in project properties -> Configuration Properties -> C/C++ -> Resolve #using References. Build the solution.
The process is the same, except:
- for Bullet, select the "Visual Studio xx Win64" generator in CMake,
- for BulletSharp, select the x64 solution platform in Configuration Manager.