From ff171a57824d37cf09954eab0d9e031c468e60d6 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 15 Jan 2015 10:27:43 -0800 Subject: [PATCH 01/13] Bullet is now required dependency --- cmake/macros/IncludeBullet.cmake | 9 ++----- interface/src/Application.cpp | 8 ------ interface/src/Application.h | 3 +-- libraries/entities/src/EntityItem.cpp | 25 ------------------- libraries/physics/src/BulletUtil.h | 3 --- libraries/physics/src/EntityMotionState.cpp | 10 -------- libraries/physics/src/EntityMotionState.h | 10 -------- libraries/physics/src/ObjectMotionState.cpp | 4 --- libraries/physics/src/ObjectMotionState.h | 13 ++++------ libraries/physics/src/PhysicsEngine.cpp | 3 --- libraries/physics/src/PhysicsEngine.h | 8 +----- libraries/physics/src/PhysicsEntity.h | 4 --- libraries/physics/src/ShapeInfoUtil.cpp | 5 ---- libraries/physics/src/ShapeInfoUtil.h | 3 --- libraries/physics/src/ShapeManager.cpp | 5 ---- libraries/physics/src/ShapeManager.h | 3 --- .../physics/src/ThreadSafeDynamicsWorld.cpp | 2 -- .../physics/src/ThreadSafeDynamicsWorld.h | 10 -------- tests/physics/src/BulletUtilTests.cpp | 12 --------- tests/physics/src/ShapeInfoTests.cpp | 12 --------- tests/physics/src/ShapeManagerTests.cpp | 12 --------- 21 files changed, 9 insertions(+), 155 deletions(-) diff --git a/cmake/macros/IncludeBullet.cmake b/cmake/macros/IncludeBullet.cmake index a238b33660..0c0c112736 100644 --- a/cmake/macros/IncludeBullet.cmake +++ b/cmake/macros/IncludeBullet.cmake @@ -8,11 +8,6 @@ # macro(INCLUDE_BULLET) - find_package(Bullet) - if (BULLET_FOUND) - include_directories("${BULLET_INCLUDE_DIRS}") - if (APPLE OR UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_BULLET_PHYSICS -isystem ${BULLET_INCLUDE_DIRS}") - endif () - endif (BULLET_FOUND) + find_package(Bullet REQUIRED) + include_directories("${BULLET_INCLUDE_DIRS}") endmacro(INCLUDE_BULLET) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index af29aff5ef..8fb2f0a924 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -189,9 +189,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : _frameCount(0), _fps(60.0f), _justStarted(true), -#ifdef USE_BULLET_PHYSICS _physicsEngine(glm::vec3(0.0f)), -#endif // USE_BULLET_PHYSICS _entities(true, this, this), _entityCollisionSystem(), _entityClipboardRenderer(false, this, this), @@ -1726,12 +1724,10 @@ void Application::init() { // save settings when avatar changes connect(_myAvatar, &MyAvatar::transformChanged, this, &Application::bumpSettings); -#ifdef USE_BULLET_PHYSICS EntityTree* tree = _entities.getTree(); _physicsEngine.setEntityTree(tree); tree->setSimulation(&_physicsEngine); _physicsEngine.init(&_entityEditSender); -#endif // USE_BULLET_PHYSICS // make sure our texture cache knows about window size changes DependencyManager::get()->associateWithWidget(glCanvas.data()); @@ -2042,12 +2038,10 @@ void Application::update(float deltaTime) { updateDialogs(deltaTime); // update various stats dialogs if present updateCursor(deltaTime); // Handle cursor updates -#ifdef USE_BULLET_PHYSICS { PerformanceTimer perfTimer("physics"); _physicsEngine.stepSimulation(); } -#endif // USE_BULLET_PHYSICS if (!_aboutToQuit) { PerformanceTimer perfTimer("entities"); @@ -3659,7 +3653,6 @@ void Application::openUrl(const QUrl& url) { void Application::updateMyAvatarTransform() { bumpSettings(); -#ifdef USE_BULLET_PHYSICS const float SIMULATION_OFFSET_QUANTIZATION = 16.0f; // meters glm::vec3 avatarPosition = _myAvatar->getPosition(); glm::vec3 physicsWorldOffset = _physicsEngine.getOriginOffset(); @@ -3673,7 +3666,6 @@ void Application::updateMyAvatarTransform() { // TODO: Andrew to replace this with method that actually moves existing object positions in PhysicsEngine _physicsEngine.setOriginOffset(newOriginOffset); } -#endif // USE_BULLET_PHYSICS } void Application::domainSettingsReceived(const QJsonObject& domainSettingsObject) { diff --git a/interface/src/Application.h b/interface/src/Application.h index 451bfdc5e1..923f4d6466 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -454,9 +455,7 @@ private: bool _justStarted; Stars _stars; -#ifdef USE_BULLET_PHYSICS PhysicsEngine _physicsEngine; -#endif // USE_BULLET_PHYSICS EntityTreeRenderer _entities; EntityCollisionSystem _entityCollisionSystem; diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 9cfb0c6c11..c6b6f6eb7d 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -691,15 +691,7 @@ void EntityItem::simulate(const quint64& now) { } } -#ifdef USE_BULLET_PHYSICS - // When Bullet is available we assume that "zero velocity" means "at rest" - // because of collision conditions this simulation does not know about - // so we don't fall in for the non-zero gravity case here. if (hasVelocity()) { -#else // !USE_BULLET_PHYSICS - if (hasVelocity() || hasGravity()) { -#endif // USE_BULLET_PHYSICS - // linear damping glm::vec3 velocity = getVelocity(); if (_damping > 0.0f) { @@ -734,12 +726,10 @@ void EntityItem::simulate(const quint64& now) { if (position.y <= getDistanceToBottomOfEntity()) { velocity = velocity * glm::vec3(1,-1,1); -#ifndef USE_BULLET_PHYSICS // if we've slowed considerably, then just stop moving, but only if no BULLET if (glm::length(velocity) <= ENTITY_ITEM_EPSILON_VELOCITY_LENGTH) { velocity = ENTITY_ITEM_ZERO_VEC3; } -#endif // !USE_BULLET_PHYSICS position.y = getDistanceToBottomOfEntity(); } @@ -756,15 +746,6 @@ void EntityItem::simulate(const quint64& now) { } } -#ifdef USE_BULLET_PHYSICS - // When Bullet is available we assume that it will tell us when velocities go to zero... -#else // !USE_BULLET_PHYSICS - // ... otherwise we help things come to rest by clamping small velocities. - if (glm::length(velocity) <= ENTITY_ITEM_EPSILON_VELOCITY_LENGTH) { - velocity = ENTITY_ITEM_ZERO_VEC3; - } -#endif // USE_BULLET_PHYSICS - // NOTE: the simulation should NOT set any DirtyFlags on this entity setPosition(position); // this will automatically recalculate our collision shape setVelocity(velocity); @@ -781,13 +762,7 @@ void EntityItem::simulate(const quint64& now) { } bool EntityItem::isMoving() const { -#ifdef USE_BULLET_PHYSICS - // When Bullet is available we assume that "zero velocity" means "at rest" - // because of collision conditions this simulation does not know about. return hasVelocity() || hasAngularVelocity(); -#else // !USE_BULLET_PHYSICS - return hasVelocity() || (hasGravity() && !isRestingOnSurface()) || hasAngularVelocity(); -#endif //USE_BULLET_PHYSICS } bool EntityItem::lifetimeHasExpired() const { diff --git a/libraries/physics/src/BulletUtil.h b/libraries/physics/src/BulletUtil.h index 78524a122e..52bf2c8b06 100644 --- a/libraries/physics/src/BulletUtil.h +++ b/libraries/physics/src/BulletUtil.h @@ -12,8 +12,6 @@ #ifndef hifi_BulletUtil_h #define hifi_BulletUtil_h -#ifdef USE_BULLET_PHYSICS - #include #include #include @@ -34,5 +32,4 @@ inline btQuaternion glmToBullet(const glm::quat& g) { return btQuaternion(g.x, g.y, g.z, g.w); } -#endif // USE_BULLET_PHYSICS #endif // hifi_BulletUtil_h diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index a15f8a9f51..87f3d1669a 100644 --- a/libraries/physics/src/EntityMotionState.cpp +++ b/libraries/physics/src/EntityMotionState.cpp @@ -12,9 +12,7 @@ #include #include -#ifdef USE_BULLET_PHYSICS #include "BulletUtil.h" -#endif // USE_BULLET_PHYSICS #include "EntityMotionState.h" QSet* _outgoingEntityList; @@ -49,7 +47,6 @@ MotionType EntityMotionState::computeMotionType() const { return _entity->getCollisionsWillMove() ? MOTION_TYPE_DYNAMIC : MOTION_TYPE_STATIC; } -#ifdef USE_BULLET_PHYSICS // This callback is invoked by the physics simulation in two cases: // (1) when the RigidBody is first added to the world // (irregardless of MotionType: STATIC, DYNAMIC, or KINEMATIC) @@ -77,10 +74,8 @@ void EntityMotionState::setWorldTransform(const btTransform& worldTrans) { _outgoingPacketFlags = DIRTY_PHYSICS_FLAGS; EntityMotionState::enqueueOutgoingEntity(_entity); } -#endif // USE_BULLET_PHYSICS void EntityMotionState::updateObjectEasy(uint32_t flags, uint32_t frame) { -#ifdef USE_BULLET_PHYSICS if (flags & (EntityItem::DIRTY_POSITION | EntityItem::DIRTY_VELOCITY)) { if (flags & EntityItem::DIRTY_POSITION) { _sentPosition = _entity->getPositionInMeters() - ObjectMotionState::getWorldOffset(); @@ -116,11 +111,9 @@ void EntityMotionState::updateObjectEasy(uint32_t flags, uint32_t frame) { _body->updateInertiaTensor(); } _body->activate(); -#endif // USE_BULLET_PHYSICS }; void EntityMotionState::updateObjectVelocities() { -#ifdef USE_BULLET_PHYSICS if (_body) { _sentVelocity = _entity->getVelocityInMeters(); setVelocity(_sentVelocity); @@ -134,7 +127,6 @@ void EntityMotionState::updateObjectVelocities() { _body->setActivationState(ACTIVE_TAG); } -#endif // USE_BULLET_PHYSICS } void EntityMotionState::computeShapeInfo(ShapeInfo& shapeInfo) { @@ -146,7 +138,6 @@ float EntityMotionState::computeMass(const ShapeInfo& shapeInfo) const { } void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_t frame) { -#ifdef USE_BULLET_PHYSICS if (_outgoingPacketFlags) { EntityItemProperties properties = _entity->getProperties(); @@ -213,5 +204,4 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_ _outgoingPacketFlags = DIRTY_PHYSICS_FLAGS; _sentFrame = frame; } -#endif // USE_BULLET_PHYSICS } diff --git a/libraries/physics/src/EntityMotionState.h b/libraries/physics/src/EntityMotionState.h index 57f3b52672..d2eb18cdbf 100644 --- a/libraries/physics/src/EntityMotionState.h +++ b/libraries/physics/src/EntityMotionState.h @@ -15,14 +15,6 @@ #include #include "ObjectMotionState.h" -#ifndef USE_BULLET_PHYSICS -// ObjectMotionState stubbery -class ObjectMotionState { -public: - // so that this stub implementation is not completely empty we give the class a data member - bool _stubData; -}; -#endif // USE_BULLET_PHYSICS class EntityItem; @@ -45,13 +37,11 @@ public: /// \return MOTION_TYPE_DYNAMIC or MOTION_TYPE_STATIC based on params set in EntityItem MotionType computeMotionType() const; -#ifdef USE_BULLET_PHYSICS // this relays incoming position/rotation to the RigidBody void getWorldTransform(btTransform& worldTrans) const; // this relays outgoing position/rotation to the EntityItem void setWorldTransform(const btTransform& worldTrans); -#endif // USE_BULLET_PHYSICS // these relay incoming values to the RigidBody void updateObjectEasy(uint32_t flags, uint32_t frame); diff --git a/libraries/physics/src/ObjectMotionState.cpp b/libraries/physics/src/ObjectMotionState.cpp index 9b3e69eb8d..65a2557383 100644 --- a/libraries/physics/src/ObjectMotionState.cpp +++ b/libraries/physics/src/ObjectMotionState.cpp @@ -9,8 +9,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#ifdef USE_BULLET_PHYSICS - #include #include "BulletUtil.h" @@ -174,5 +172,3 @@ bool ObjectMotionState::shouldSendUpdate(uint32_t simulationFrame) { glm::quat actualRotation = bulletToGLM(worldTrans.getRotation()); return (fabsf(glm::dot(actualRotation, _sentRotation)) < MIN_ROTATION_DOT); } - -#endif // USE_BULLET_PHYSICS diff --git a/libraries/physics/src/ObjectMotionState.h b/libraries/physics/src/ObjectMotionState.h index ea3d5de73b..1b1af5de6f 100644 --- a/libraries/physics/src/ObjectMotionState.h +++ b/libraries/physics/src/ObjectMotionState.h @@ -12,8 +12,13 @@ #ifndef hifi_ObjectMotionState_h #define hifi_ObjectMotionState_h +#include +#include + #include +#include "ShapeInfo.h" + enum MotionType { MOTION_TYPE_STATIC, // no motion MOTION_TYPE_DYNAMIC, // motion according to physical laws @@ -33,13 +38,6 @@ const uint32_t DIRTY_PHYSICS_FLAGS = HARD_DIRTY_PHYSICS_FLAGS | EASY_DIRTY_PHYSI // These are the outgoing flags that the PhysicsEngine can affect: const uint32_t OUTGOING_DIRTY_PHYSICS_FLAGS = EntityItem::DIRTY_POSITION | EntityItem::DIRTY_VELOCITY; -#ifdef USE_BULLET_PHYSICS - -#include -#include -#include // for EntityItem::DIRTY_FOO bitmasks - -#include "ShapeInfo.h" class OctreeEditPacketSender; @@ -112,5 +110,4 @@ protected: glm::vec3 _sentAcceleration; }; -#endif // USE_BULLET_PHYSICS #endif // hifi_ObjectMotionState_h diff --git a/libraries/physics/src/PhysicsEngine.cpp b/libraries/physics/src/PhysicsEngine.cpp index e08f271255..ca83bbf095 100644 --- a/libraries/physics/src/PhysicsEngine.cpp +++ b/libraries/physics/src/PhysicsEngine.cpp @@ -10,7 +10,6 @@ // #include "PhysicsEngine.h" -#ifdef USE_BULLET_PHYSICS #include "ShapeInfoUtil.h" #include "ThreadSafeDynamicsWorld.h" @@ -400,5 +399,3 @@ void PhysicsEngine::updateObjectHard(btRigidBody* body, ObjectMotionState* motio body->activate(); } - -#endif // USE_BULLET_PHYSICS diff --git a/libraries/physics/src/PhysicsEngine.h b/libraries/physics/src/PhysicsEngine.h index c6d6bd4626..589286588b 100644 --- a/libraries/physics/src/PhysicsEngine.h +++ b/libraries/physics/src/PhysicsEngine.h @@ -14,8 +14,6 @@ typedef unsigned int uint32_t; -#ifdef USE_BULLET_PHYSICS - #include #include @@ -94,11 +92,7 @@ private: EntityEditPacketSender* _entityPacketSender; uint32_t _frameCount; + btScalar _infinity = BT_INFINITY; // HACK: eliminates unused variable warning from Bullet headers }; -#else // USE_BULLET_PHYSICS -// PhysicsEngine stubbery until Bullet is required -class PhysicsEngine { -}; -#endif // USE_BULLET_PHYSICS #endif // hifi_PhysicsEngine_h diff --git a/libraries/physics/src/PhysicsEntity.h b/libraries/physics/src/PhysicsEntity.h index 92b302debb..358c058551 100644 --- a/libraries/physics/src/PhysicsEntity.h +++ b/libraries/physics/src/PhysicsEntity.h @@ -21,10 +21,6 @@ #include #include -#ifdef USE_BULLET_PHYSICS -#include "PhysicsEngine.h" -#endif // USE_BULLET_PHYSICS - class Shape; class PhysicsSimulation; diff --git a/libraries/physics/src/ShapeInfoUtil.cpp b/libraries/physics/src/ShapeInfoUtil.cpp index f562201f73..0e9dc55a8c 100644 --- a/libraries/physics/src/ShapeInfoUtil.cpp +++ b/libraries/physics/src/ShapeInfoUtil.cpp @@ -15,9 +15,6 @@ #include "ShapeInfoUtil.h" #include "BulletUtil.h" -#ifdef USE_BULLET_PHYSICS - - int ShapeInfoUtil::toBulletShapeType(int shapeInfoType) { int bulletShapeType = INVALID_SHAPE_PROXYTYPE; switch(shapeInfoType) { @@ -168,5 +165,3 @@ DoubleHashKey ShapeInfoUtil::computeHash(const ShapeInfo& info) { key._hash2 = (int)hash; return key; } - -#endif // USE_BULLET_PHYSICS diff --git a/libraries/physics/src/ShapeInfoUtil.h b/libraries/physics/src/ShapeInfoUtil.h index 7363cf483b..438e3df715 100644 --- a/libraries/physics/src/ShapeInfoUtil.h +++ b/libraries/physics/src/ShapeInfoUtil.h @@ -12,8 +12,6 @@ #ifndef hifi_ShapeInfoUtil_h #define hifi_ShapeInfoUtil_h -#ifdef USE_BULLET_PHYSICS - #include #include @@ -35,5 +33,4 @@ namespace ShapeInfoUtil { int fromBulletShapeType(int bulletShapeType); }; -#endif // USE_BULLET_PHYSICS #endif // hifi_ShapeInfoUtil_h diff --git a/libraries/physics/src/ShapeManager.cpp b/libraries/physics/src/ShapeManager.cpp index 1da705a5ff..b153150ce6 100644 --- a/libraries/physics/src/ShapeManager.cpp +++ b/libraries/physics/src/ShapeManager.cpp @@ -9,8 +9,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#ifdef USE_BULLET_PHYSICS - #include #include "ShapeInfoUtil.h" @@ -104,6 +102,3 @@ int ShapeManager::getNumReferences(const ShapeInfo& info) const { } return -1; } - - -#endif // USE_BULLET_PHYSICS diff --git a/libraries/physics/src/ShapeManager.h b/libraries/physics/src/ShapeManager.h index 6eb4f363ff..3fe80c7b61 100644 --- a/libraries/physics/src/ShapeManager.h +++ b/libraries/physics/src/ShapeManager.h @@ -12,8 +12,6 @@ #ifndef hifi_ShapeManager_h #define hifi_ShapeManager_h -#ifdef USE_BULLET_PHYSICS - #include #include @@ -52,5 +50,4 @@ private: btAlignedObjectArray _pendingGarbage; }; -#endif // USE_BULLET_PHYSICS #endif // hifi_ShapeManager_h diff --git a/libraries/physics/src/ThreadSafeDynamicsWorld.cpp b/libraries/physics/src/ThreadSafeDynamicsWorld.cpp index e204ae9e7f..c7ee9ce2a0 100644 --- a/libraries/physics/src/ThreadSafeDynamicsWorld.cpp +++ b/libraries/physics/src/ThreadSafeDynamicsWorld.cpp @@ -17,7 +17,6 @@ #include "ThreadSafeDynamicsWorld.h" -#ifdef USE_BULLET_PHYSICS ThreadSafeDynamicsWorld::ThreadSafeDynamicsWorld( btDispatcher* dispatcher, btBroadphaseInterface* pairCache, @@ -82,4 +81,3 @@ int ThreadSafeDynamicsWorld::stepSimulation( btScalar timeStep, int maxSubSteps, return subSteps; } -#endif // USE_BULLET_PHYSICS diff --git a/libraries/physics/src/ThreadSafeDynamicsWorld.h b/libraries/physics/src/ThreadSafeDynamicsWorld.h index 64d5413c56..832efb9b60 100644 --- a/libraries/physics/src/ThreadSafeDynamicsWorld.h +++ b/libraries/physics/src/ThreadSafeDynamicsWorld.h @@ -18,7 +18,6 @@ #ifndef hifi_ThreadSafeDynamicsWorld_h #define hifi_ThreadSafeDynamicsWorld_h -#ifdef USE_BULLET_PHYSICS #include ATTRIBUTE_ALIGNED16(class) ThreadSafeDynamicsWorld : public btDiscreteDynamicsWorld { @@ -40,13 +39,4 @@ public: float getLocalTimeAccumulation() const { return m_localTime; } }; -#else // USE_BULLET_PHYSICS -// stubbery for ThreadSafeDynamicsWorld when Bullet not available -class ThreadSafeDynamicsWorld { -public: - ThreadSafeDynamicsWorld() {} -}; - -#endif // USE_BULLET_PHYSICS - #endif // hifi_ThreadSafeDynamicsWorld_h diff --git a/tests/physics/src/BulletUtilTests.cpp b/tests/physics/src/BulletUtilTests.cpp index 06b1815c6e..a094cfe94b 100644 --- a/tests/physics/src/BulletUtilTests.cpp +++ b/tests/physics/src/BulletUtilTests.cpp @@ -16,7 +16,6 @@ #include "BulletUtilTests.h" -#ifdef USE_BULLET_PHYSICS void BulletUtilTests::fromBulletToGLM() { btVector3 bV(1.23f, 4.56f, 7.89f); glm::vec3 gV = bulletToGLM(bV); @@ -101,14 +100,3 @@ void BulletUtilTests::runAllTests() { fromBulletToGLM(); fromGLMToBullet(); } - -#else // USE_BULLET_PHYSICS -void BulletUtilTests::fromBulletToGLM() { -} - -void BulletUtilTests::fromGLMToBullet() { -} - -void BulletUtilTests::runAllTests() { -} -#endif // USE_BULLET_PHYSICS diff --git a/tests/physics/src/ShapeInfoTests.cpp b/tests/physics/src/ShapeInfoTests.cpp index a4db3a5764..cbef53f2eb 100644 --- a/tests/physics/src/ShapeInfoTests.cpp +++ b/tests/physics/src/ShapeInfoTests.cpp @@ -11,10 +11,8 @@ #include -#ifdef USE_BULLET_PHYSICS #include #include -#endif // USE_BULLET_PHYSICS #include #include @@ -24,7 +22,6 @@ #include "ShapeInfoTests.h" void ShapeInfoTests::testHashFunctions() { -#ifdef USE_BULLET_PHYSICS int maxTests = 10000000; ShapeInfo info; btHashMap hashes; @@ -135,11 +132,9 @@ void ShapeInfoTests::testHashFunctions() { for (int i = 0; i < 32; ++i) { std::cout << "bit 0x" << std::hex << masks[i] << std::dec << " = " << bits[i] << std::endl; } -#endif // USE_BULLET_PHYSICS } void ShapeInfoTests::testBoxShape() { -#ifdef USE_BULLET_PHYSICS ShapeInfo info; glm::vec3 halfExtents(1.23f, 4.56f, 7.89f); info.setBox(halfExtents); @@ -165,11 +160,9 @@ void ShapeInfoTests::testBoxShape() { } delete shape; -#endif // USE_BULLET_PHYSICS } void ShapeInfoTests::testSphereShape() { -#ifdef USE_BULLET_PHYSICS ShapeInfo info; float radius = 1.23f; info.setSphere(radius); @@ -191,11 +184,9 @@ void ShapeInfoTests::testSphereShape() { } delete shape; -#endif // USE_BULLET_PHYSICS } void ShapeInfoTests::testCylinderShape() { -#ifdef USE_BULLET_PHYSICS ShapeInfo info; float radius = 1.23f; float height = 4.56f; @@ -218,11 +209,9 @@ void ShapeInfoTests::testCylinderShape() { } delete shape; -#endif // USE_BULLET_PHYSICS } void ShapeInfoTests::testCapsuleShape() { -#ifdef USE_BULLET_PHYSICS ShapeInfo info; float radius = 1.23f; float height = 4.56f; @@ -245,7 +234,6 @@ void ShapeInfoTests::testCapsuleShape() { } delete shape; -#endif // USE_BULLET_PHYSICS } void ShapeInfoTests::runAllTests() { diff --git a/tests/physics/src/ShapeManagerTests.cpp b/tests/physics/src/ShapeManagerTests.cpp index 5be247f25f..e49b9b8063 100644 --- a/tests/physics/src/ShapeManagerTests.cpp +++ b/tests/physics/src/ShapeManagerTests.cpp @@ -17,7 +17,6 @@ #include "ShapeManagerTests.h" void ShapeManagerTests::testShapeAccounting() { -#ifdef USE_BULLET_PHYSICS ShapeManager shapeManager; ShapeInfo info; info.setBox(glm::vec3(1.0f, 1.0f, 1.0f)); @@ -118,11 +117,9 @@ void ShapeManagerTests::testShapeAccounting() { std::cout << __FILE__ << ":" << __LINE__ << " ERROR: expected refcount = 1 for shape but found refcount = " << numReferences << std::endl; } -#endif // USE_BULLET_PHYSICS } void ShapeManagerTests::addManyShapes() { -#ifdef USE_BULLET_PHYSICS ShapeManager shapeManager; int numSizes = 100; @@ -152,11 +149,9 @@ void ShapeManagerTests::addManyShapes() { std::cout << __FILE__ << ":" << __LINE__ << " ERROR: expected numShapes = " << numSizes << " but found numShapes = " << numShapes << std::endl; } -#endif // USE_BULLET_PHYSICS } void ShapeManagerTests::addBoxShape() { -#ifdef USE_BULLET_PHYSICS ShapeInfo info; glm::vec3 halfExtents(1.23f, 4.56f, 7.89f); info.setBox(halfExtents); @@ -172,11 +167,9 @@ void ShapeManagerTests::addBoxShape() { std::cout << __FILE__ << ":" << __LINE__ << " ERROR: Box ShapeInfo --> shape --> ShapeInfo --> shape did not work" << std::endl; } -#endif // USE_BULLET_PHYSICS } void ShapeManagerTests::addSphereShape() { -#ifdef USE_BULLET_PHYSICS ShapeInfo info; float radius = 1.23f; info.setSphere(radius); @@ -192,11 +185,9 @@ void ShapeManagerTests::addSphereShape() { std::cout << __FILE__ << ":" << __LINE__ << " ERROR: Sphere ShapeInfo --> shape --> ShapeInfo --> shape did not work" << std::endl; } -#endif // USE_BULLET_PHYSICS } void ShapeManagerTests::addCylinderShape() { -#ifdef USE_BULLET_PHYSICS ShapeInfo info; float radius = 1.23f; float height = 4.56f; @@ -213,11 +204,9 @@ void ShapeManagerTests::addCylinderShape() { std::cout << __FILE__ << ":" << __LINE__ << " ERROR: Cylinder ShapeInfo --> shape --> ShapeInfo --> shape did not work" << std::endl; } -#endif // USE_BULLET_PHYSICS } void ShapeManagerTests::addCapsuleShape() { -#ifdef USE_BULLET_PHYSICS ShapeInfo info; float radius = 1.23f; float height = 4.56f; @@ -234,7 +223,6 @@ void ShapeManagerTests::addCapsuleShape() { std::cout << __FILE__ << ":" << __LINE__ << " ERROR: Capsule ShapeInfo --> shape --> ShapeInfo --> shape did not work" << std::endl; } -#endif // USE_BULLET_PHYSICS } void ShapeManagerTests::runAllTests() { From 9eb4d663271600e0526363a5b733710d81ee4edf Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 15 Jan 2015 10:36:17 -0800 Subject: [PATCH 02/13] remove warnings --- libraries/physics/src/BulletUtil.h | 4 ++++ libraries/physics/src/ObjectMotionState.cpp | 8 -------- libraries/physics/src/PhysicsEngine.h | 1 - 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/libraries/physics/src/BulletUtil.h b/libraries/physics/src/BulletUtil.h index 52bf2c8b06..35b75a1040 100644 --- a/libraries/physics/src/BulletUtil.h +++ b/libraries/physics/src/BulletUtil.h @@ -32,4 +32,8 @@ inline btQuaternion glmToBullet(const glm::quat& g) { return btQuaternion(g.x, g.y, g.z, g.w); } +inline bool avoidUnusedVariableWarningInBulletHeaders(float number) { + return number == BT_INFINITY; +} + #endif // hifi_BulletUtil_h diff --git a/libraries/physics/src/ObjectMotionState.cpp b/libraries/physics/src/ObjectMotionState.cpp index 65a2557383..c424c11aa8 100644 --- a/libraries/physics/src/ObjectMotionState.cpp +++ b/libraries/physics/src/ObjectMotionState.cpp @@ -14,14 +14,6 @@ #include "BulletUtil.h" #include "ObjectMotionState.h" -const float MIN_DENSITY = 200.0f; -const float DEFAULT_DENSITY = 1000.0f; -const float MAX_DENSITY = 20000.0f; - -const float MIN_VOLUME = 0.001f; -const float DEFAULT_VOLUME = 1.0f; -const float MAX_VOLUME = 1000000.0f; - const float DEFAULT_FRICTION = 0.5f; const float MAX_FRICTION = 10.0f; diff --git a/libraries/physics/src/PhysicsEngine.h b/libraries/physics/src/PhysicsEngine.h index 589286588b..578fd1ece4 100644 --- a/libraries/physics/src/PhysicsEngine.h +++ b/libraries/physics/src/PhysicsEngine.h @@ -92,7 +92,6 @@ private: EntityEditPacketSender* _entityPacketSender; uint32_t _frameCount; - btScalar _infinity = BT_INFINITY; // HACK: eliminates unused variable warning from Bullet headers }; #endif // hifi_PhysicsEngine_h From 51cc9d6d9a49f29c19d03026e41d72de2be594fa Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 15 Jan 2015 10:46:09 -0800 Subject: [PATCH 03/13] alt method for repressing unused var warnings --- cmake/macros/IncludeBullet.cmake | 1 + libraries/physics/src/BulletUtil.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cmake/macros/IncludeBullet.cmake b/cmake/macros/IncludeBullet.cmake index 0c0c112736..56b6ce0ced 100644 --- a/cmake/macros/IncludeBullet.cmake +++ b/cmake/macros/IncludeBullet.cmake @@ -10,4 +10,5 @@ macro(INCLUDE_BULLET) find_package(Bullet REQUIRED) include_directories("${BULLET_INCLUDE_DIRS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}") endmacro(INCLUDE_BULLET) diff --git a/libraries/physics/src/BulletUtil.h b/libraries/physics/src/BulletUtil.h index 35b75a1040..52bf2c8b06 100644 --- a/libraries/physics/src/BulletUtil.h +++ b/libraries/physics/src/BulletUtil.h @@ -32,8 +32,4 @@ inline btQuaternion glmToBullet(const glm::quat& g) { return btQuaternion(g.x, g.y, g.z, g.w); } -inline bool avoidUnusedVariableWarningInBulletHeaders(float number) { - return number == BT_INFINITY; -} - #endif // hifi_BulletUtil_h From 2177a1701a43e7b8fba3b5f076bb511244bc9ac2 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 15 Jan 2015 11:38:38 -0800 Subject: [PATCH 04/13] more correct cmake config for Bullet (copying pattern from IncludeGLM.cmake) --- cmake/macros/IncludeBullet.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/macros/IncludeBullet.cmake b/cmake/macros/IncludeBullet.cmake index 56b6ce0ced..186e84d1ab 100644 --- a/cmake/macros/IncludeBullet.cmake +++ b/cmake/macros/IncludeBullet.cmake @@ -10,5 +10,7 @@ macro(INCLUDE_BULLET) find_package(Bullet REQUIRED) include_directories("${BULLET_INCLUDE_DIRS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}") + if (APPLE OR UNIX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}") + endif() endmacro(INCLUDE_BULLET) From 6836f23574c0c7a9b9f704c68b528bea56bce86a Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 15 Jan 2015 14:53:55 -0800 Subject: [PATCH 05/13] add custom FindBullet.cmake module --- cmake/modules/FindBullet.cmake | 89 ++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 cmake/modules/FindBullet.cmake diff --git a/cmake/modules/FindBullet.cmake b/cmake/modules/FindBullet.cmake new file mode 100644 index 0000000000..3487abb233 --- /dev/null +++ b/cmake/modules/FindBullet.cmake @@ -0,0 +1,89 @@ +# - Try to find the Bullet physics engine +# +# This module defines the following variables +# +# BULLET_FOUND - Was bullet found +# BULLET_INCLUDE_DIRS - the Bullet include directories +# BULLET_LIBRARIES - Link to this, by default it includes +# all bullet components (Dynamics, +# Collision, LinearMath, & SoftBody) +# +# This module accepts the following variables +# +# BULLET_ROOT - Can be set to bullet install path or Windows build path +# +# Modified on 2015.01.15 by Andrew Meadows +# This is an adapted version of the FindBullet.cmake module distributed with Cmake 2.8.12.2 +# The original license for that file is displayed below. +# +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +macro(_FIND_BULLET_LIBRARY _var) + find_library(${_var} + NAMES + ${ARGN} + HINTS + $ENV{HIFI_LIB_DIR}/bullet + $ENV{BULLET_ROOT_DIR} + ${BULLET_ROOT} + ${BULLET_ROOT}/lib/Release + ${BULLET_ROOT}/lib/Debug + ${BULLET_ROOT}/out/release8/libs + ${BULLET_ROOT}/out/debug8/libs + PATH_SUFFIXES lib + ) + mark_as_advanced(${_var}) +endmacro() + +macro(_BULLET_APPEND_LIBRARIES _list _release) + set(_debug ${_release}_DEBUG) + if(${_debug}) + set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}}) + else() + set(${_list} ${${_list}} ${${_release}}) + endif() +endmacro() + +find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h + HINTS + ${BULLET_ROOT}/include + ${BULLET_ROOT}/src + PATH_SUFFIXES bullet +) + +# Find the libraries + +_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics) +#_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletDynamics_d) +_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision) +#_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d) +_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY BulletMath LinearMath) +#_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_Debug LinearMath_d) +_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody) +#_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d) + + +find_package_handle_standard_args(Bullet "Could NOT find Bullet, try to set the path to Bullet root folder in the system variable BULLET_ROOT_DIR" + BULLET_DYNAMICS_LIBRARY BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY + BULLET_INCLUDE_DIR +) + +set(BULLET_INCLUDE_DIRS ${BULLET_INCLUDE_DIR}) +if(BULLET_FOUND) + _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_DYNAMICS_LIBRARY) + _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_COLLISION_LIBRARY) + _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_MATH_LIBRARY) + _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_SOFTBODY_LIBRARY) +endif() From ba31309206eef8560e4414c64e13d98f1c6f8f35 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 16 Jan 2015 08:57:35 -0800 Subject: [PATCH 06/13] also find debug Bullet libs --- cmake/modules/FindBullet.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/modules/FindBullet.cmake b/cmake/modules/FindBullet.cmake index 3487abb233..9401a799e1 100644 --- a/cmake/modules/FindBullet.cmake +++ b/cmake/modules/FindBullet.cmake @@ -66,13 +66,13 @@ find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h # Find the libraries _FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics) -#_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletDynamics_d) +_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletDynamics_d) _FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision) -#_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d) +_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d) _FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY BulletMath LinearMath) -#_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_Debug LinearMath_d) +_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_Debug LinearMath_d) _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody) -#_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d) +_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d) find_package_handle_standard_args(Bullet "Could NOT find Bullet, try to set the path to Bullet root folder in the system variable BULLET_ROOT_DIR" From 54a6a0a27c5d1f7614ba7843a12c7c8c7960f96a Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 16 Jan 2015 12:50:50 -0800 Subject: [PATCH 07/13] use custom config when hunting for bullet include --- cmake/modules/FindBullet.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/FindBullet.cmake b/cmake/modules/FindBullet.cmake index 9401a799e1..98d26b5ea4 100644 --- a/cmake/modules/FindBullet.cmake +++ b/cmake/modules/FindBullet.cmake @@ -58,6 +58,8 @@ endmacro() find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h HINTS + $ENV{HIFI_LIB_DIR}/bullet + $ENV{BULLET_ROOT_DIR} ${BULLET_ROOT}/include ${BULLET_ROOT}/src PATH_SUFFIXES bullet From a293c61c0540eb323a750780941a8cda17ab41b9 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 16 Jan 2015 13:20:58 -0800 Subject: [PATCH 08/13] use hifi_library_search_hints() macro --- cmake/modules/FindBullet.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/modules/FindBullet.cmake b/cmake/modules/FindBullet.cmake index 98d26b5ea4..5b2bd6696c 100644 --- a/cmake/modules/FindBullet.cmake +++ b/cmake/modules/FindBullet.cmake @@ -30,13 +30,16 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) + +include("${MACRO_DIR}/HifiLibrarySearchHints.cmake") +hifi_library_search_hints("bullet") + macro(_FIND_BULLET_LIBRARY _var) find_library(${_var} NAMES ${ARGN} HINTS - $ENV{HIFI_LIB_DIR}/bullet - $ENV{BULLET_ROOT_DIR} + ${BULLET_SEARCH_DIRS} ${BULLET_ROOT} ${BULLET_ROOT}/lib/Release ${BULLET_ROOT}/lib/Debug @@ -58,8 +61,7 @@ endmacro() find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h HINTS - $ENV{HIFI_LIB_DIR}/bullet - $ENV{BULLET_ROOT_DIR} + ${BULLET_SEARCH_DIRS} ${BULLET_ROOT}/include ${BULLET_ROOT}/src PATH_SUFFIXES bullet From e5eccbc7911eee567ed23171105f492a124b7d53 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 16 Jan 2015 13:25:43 -0800 Subject: [PATCH 09/13] add back BULLET_ROOT_DIR hint --- cmake/modules/FindBullet.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/FindBullet.cmake b/cmake/modules/FindBullet.cmake index 5b2bd6696c..7651de0972 100644 --- a/cmake/modules/FindBullet.cmake +++ b/cmake/modules/FindBullet.cmake @@ -40,6 +40,7 @@ macro(_FIND_BULLET_LIBRARY _var) ${ARGN} HINTS ${BULLET_SEARCH_DIRS} + $ENV{BULLET_ROOT_DIR} ${BULLET_ROOT} ${BULLET_ROOT}/lib/Release ${BULLET_ROOT}/lib/Debug @@ -62,6 +63,7 @@ endmacro() find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h HINTS ${BULLET_SEARCH_DIRS} + $ENV{BULLET_ROOT_DIR} ${BULLET_ROOT}/include ${BULLET_ROOT}/src PATH_SUFFIXES bullet From 0a04dc844516a7475d3f85c439751e0a2ad95d4a Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 16 Jan 2015 13:38:11 -0800 Subject: [PATCH 10/13] modify PATH_SUFFIXES when hunting for include dir --- cmake/modules/FindBullet.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/FindBullet.cmake b/cmake/modules/FindBullet.cmake index 7651de0972..9a2ccb09bb 100644 --- a/cmake/modules/FindBullet.cmake +++ b/cmake/modules/FindBullet.cmake @@ -66,7 +66,7 @@ find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h $ENV{BULLET_ROOT_DIR} ${BULLET_ROOT}/include ${BULLET_ROOT}/src - PATH_SUFFIXES bullet + PATH_SUFFIXES bullet include/bullet ) # Find the libraries From 117ed9206c32cce2b211f9258e81dd80c3ed6295 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 16 Jan 2015 16:19:47 -0800 Subject: [PATCH 11/13] add ${BULLET_SEARCH_DIRS}/include, remove PATH_SUFFIXES include/bullet --- cmake/modules/FindBullet.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindBullet.cmake b/cmake/modules/FindBullet.cmake index 9a2ccb09bb..e99b557df4 100644 --- a/cmake/modules/FindBullet.cmake +++ b/cmake/modules/FindBullet.cmake @@ -62,11 +62,11 @@ endmacro() find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h HINTS - ${BULLET_SEARCH_DIRS} + ${BULLET_SEARCH_DIRS}/include $ENV{BULLET_ROOT_DIR} ${BULLET_ROOT}/include ${BULLET_ROOT}/src - PATH_SUFFIXES bullet include/bullet + PATH_SUFFIXES bullet ) # Find the libraries From 9860feec6193ecdb55eb1e422f77c90dc54ca5a7 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 19 Jan 2015 09:54:44 -0800 Subject: [PATCH 12/13] Tweak 3D text overlay text size calculations --- interface/src/ui/overlays/Text3DOverlay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/ui/overlays/Text3DOverlay.cpp b/interface/src/ui/overlays/Text3DOverlay.cpp index 92f6350936..2f4cde50f7 100644 --- a/interface/src/ui/overlays/Text3DOverlay.cpp +++ b/interface/src/ui/overlays/Text3DOverlay.cpp @@ -238,8 +238,8 @@ QSizeF Text3DOverlay::textSize(const QString& text) const { QFont font(SANS_FONT_FAMILY, FIXED_FONT_POINT_SIZE); // Same font properties as render() QFontMetrics fontMetrics(font); - const float TEXT_SCALE_ADJUST = 1.02f; // Experimentally detemined for the specified font - const int TEXT_HEIGHT_ADJUST = -6; + const float TEXT_SCALE_ADJUST = 1.025f; // Experimentally detemined for the specified font + const int TEXT_HEIGHT_ADJUST = -10; float scaleFactor = _lineHeight * TEXT_SCALE_ADJUST * LINE_SCALE_RATIO / (float)FIXED_FONT_POINT_SIZE; QStringList lines = text.split(QRegExp("\r\n|\r|\n")); From fd9b56fe49dcb5ca7775254eccf559b0f1bb4b8f Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Mon, 19 Jan 2015 10:41:45 -0800 Subject: [PATCH 13/13] add lib/Release and lib/Debug to lib PATH_SUFFIXES --- cmake/modules/FindBullet.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/modules/FindBullet.cmake b/cmake/modules/FindBullet.cmake index e99b557df4..65d064e91b 100644 --- a/cmake/modules/FindBullet.cmake +++ b/cmake/modules/FindBullet.cmake @@ -42,11 +42,9 @@ macro(_FIND_BULLET_LIBRARY _var) ${BULLET_SEARCH_DIRS} $ENV{BULLET_ROOT_DIR} ${BULLET_ROOT} - ${BULLET_ROOT}/lib/Release - ${BULLET_ROOT}/lib/Debug ${BULLET_ROOT}/out/release8/libs ${BULLET_ROOT}/out/debug8/libs - PATH_SUFFIXES lib + PATH_SUFFIXES lib lib/Release lib/Debug ) mark_as_advanced(${_var}) endmacro()