Skip to content

Commit

Permalink
--remove bullet physics as separate library and just include in physics
Browse files Browse the repository at this point in the history
  • Loading branch information
jturner65 committed Dec 2, 2024
1 parent 0885af4 commit 99e44bc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 49 deletions.
42 changes: 37 additions & 5 deletions src/esp/physics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/configure.h
)

add_library(
physics STATIC
set(
physics_SOURCES
ArticulatedLink.h
ArticulatedObject.h
CollisionGroupHelper.cpp
Expand Down Expand Up @@ -41,10 +41,38 @@ add_library(
)

if(BUILD_WITH_BULLET)
add_subdirectory(bullet)

target_link_libraries(physics PUBLIC bulletphysics)
endif()
find_package(MagnumIntegration REQUIRED Bullet)
find_package(Bullet REQUIRED Dynamics)
# Add bullet sources
set(
physics_SOURCES
${physics_SOURCES}
bullet/BulletArticulatedLink.h
bullet/BulletArticulatedObject.cpp
bullet/BulletArticulatedObject.h
bullet/BulletBase.cpp
bullet/BulletBase.h
bullet/BulletCollisionHelper.cpp
bullet/BulletCollisionHelper.h
bullet/BulletPhysicsManager.cpp
bullet/BulletPhysicsManager.h
bullet/BulletRigidObject.cpp
bullet/BulletRigidObject.h
bullet/BulletRigidStage.cpp
bullet/BulletRigidStage.h
bullet/BulletURDFImporter.cpp
bullet/BulletURDFImporter.h
bullet/objectWrappers/ManagedBulletArticulatedObject.h
bullet/objectWrappers/ManagedBulletRigidObject.h
)

endif() #BUILD_WITH_BULLET

add_library(
physics STATIC
${physics_SOURCES}
)

target_link_libraries(
physics
Expand All @@ -58,4 +86,8 @@ target_link_libraries(
MagnumPlugins::StbImageConverter
)

if(BUILD_WITH_BULLET)
target_link_libraries(physics PUBLIC MagnumIntegration::Bullet Bullet::Dynamics)
endif() #BUILD_WITH_BULLET

set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
44 changes: 0 additions & 44 deletions src/esp/physics/bullet/CMakeLists.txt

This file was deleted.

0 comments on commit 99e44bc

Please sign in to comment.