diff --git a/libraries/entities/src/EntityMotionState.cpp b/libraries/entities/src/EntityMotionState.cpp index f9ff7291d9..067583209e 100644 --- a/libraries/entities/src/EntityMotionState.cpp +++ b/libraries/entities/src/EntityMotionState.cpp @@ -9,6 +9,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#ifdef USE_BULLET_PHYSICS #include #include "EntityItem.h" @@ -70,3 +71,4 @@ void EntityMotionState::computeShapeInfo(ShapeInfo& info) { info.setBox(bulletHalfExtents); } +#endif // USE_BULLET_PHYSICS diff --git a/libraries/physics/src/BulletUtil.h b/libraries/physics/src/BulletUtil.h index 36b3960521..41d78dd97e 100644 --- a/libraries/physics/src/BulletUtil.h +++ b/libraries/physics/src/BulletUtil.h @@ -12,6 +12,8 @@ #ifndef hifi_BulletUtil_h #define hifi_BulletUtil_h +#ifdef USE_BULLET_PHYSICS + #include #include #include @@ -37,4 +39,5 @@ inline void glmToBullet(const glm::quat& g, btQuaternion& b) { b = btQuaternion(g.x, g.y, g.z, g.w); } +#endif // USE_BULLET_PHYSICS #endif // hifi_BulletUtil_h diff --git a/libraries/physics/src/PhysicsWorld.cpp b/libraries/physics/src/PhysicsWorld.cpp index 72d2786350..230e510729 100644 --- a/libraries/physics/src/PhysicsWorld.cpp +++ b/libraries/physics/src/PhysicsWorld.cpp @@ -10,6 +10,7 @@ // #include "PhysicsWorld.h" +#ifdef USE_BULLET_PHYSICS PhysicsWorld::~PhysicsWorld() { } @@ -131,3 +132,5 @@ bool PhysicsWorld::updateEntityMassProperties(CustomMotionState* motionState, fl assert(motionState); return false; } + +#endif // USE_BULLET_PHYSICS diff --git a/tests/physics/src/BulletUtilTests.cpp b/tests/physics/src/BulletUtilTests.cpp index 5486870196..823d0d01b2 100644 --- a/tests/physics/src/BulletUtilTests.cpp +++ b/tests/physics/src/BulletUtilTests.cpp @@ -16,6 +16,7 @@ #include "BulletUtilTests.h" +#ifdef USE_BULLET_PHYSICS void BulletUtilTests::fromBulletToGLM() { btVector3 bV(1.23f, 4.56f, 7.89f); glm::vec3 gV; @@ -105,3 +106,13 @@ void BulletUtilTests::runAllTests() { fromGLMToBullet(); } +#else // USE_BULLET_PHYSICS +void BulletUtilTests::fromBulletToGLM() { +} + +void BulletUtilTests::fromGLMToBullet() { +} + +void BulletUtilTests::runAllTests() { +} +#endif // USE_BULLET_PHYSICS