-
Notifications
You must be signed in to change notification settings - Fork 61
Build instructions
- CMake
- Microsoft Visual C++ 2022, including components:
- Desktop development with C++
- .NET desktop development
- C++/CLI support
- 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/2022 for "Visual Studio 17 2022"
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, BUILD_HACD_EXTRA and BUILD_SERIALIZE_EXTRA.
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 Win32 platform for CMake generator,
- for BulletSharp, select the Win32 solution platform in Configuration Manager.