Skip to content

Commit

Permalink
Make box2d 3.0 works and remove all chipmunk related
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Oct 4, 2024
1 parent 95147ee commit 630f361
Show file tree
Hide file tree
Showing 425 changed files with 51,702 additions and 64,399 deletions.
16 changes: 0 additions & 16 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,22 +263,6 @@ if(AX_ENABLE_PHYSICS)
ax_add_3rd(box2d OPTIONS ${box2d_opts})
endif()

if(AX_ENABLE_PHYSICS)
ax_add_3rd(chipmunk OPTIONS
"CP_BUILD_SHARED OFF"
"CP_BUILD_STATIC ON"
"CP_BUILD_DEMOS OFF"
"CP_INSTALL_STATIC OFF"
)
set_target_properties(chipmunk PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/chipmunk/include"
)

# !important axmol not use double precision
target_compile_definitions(chipmunk PUBLIC CP_USE_CGTYPES=0)
target_compile_definitions(chipmunk PUBLIC CP_USE_DOUBLES=0)
endif()

ax_add_3rd(freetype OPTIONS
"DISABLE_FORCE_DEBUG_POSTFIX ON"
"SKIP_INSTALL_ALL TRUE"
Expand Down
7 changes: 1 addition & 6 deletions 3rdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## Box2D
- [![Upstream](https://img.shields.io/github/v/release/erincatto/box2d?label=Upstream)](https://github.com/erincatto/box2d)
- Version: 2.4.2
- Version: 3.0.0-df7373c
- License: MIT

## Bullet
Expand All @@ -25,11 +25,6 @@
- Version: 1.33.1
- License: MIT

## Chipmunk2D
- [![Upstream](https://img.shields.io/github/v/tag/slembcke/Chipmunk2D?label=Upstream)](https://github.com/slembcke/Chipmunk2D)
- Version: git 7.0.3-0cb05e7 {until Dec 16, 2021}
- License: MIT

## Clipper2
- [![Upstream](https://img.shields.io/github/v/tag/AngusJohnson/Clipper2?label=Upstream)](https://github.com/AngusJohnson/Clipper2)
- Version: 1.4.0
Expand Down
105 changes: 8 additions & 97 deletions 3rdparty/box2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,105 +4,16 @@ set(target_name ${lib_name})

project(${lib_name})

set(BOX2D_SOURCE_FILES
src/collision/b2_broad_phase.cpp
src/collision/b2_chain_shape.cpp
src/collision/b2_circle_shape.cpp
src/collision/b2_collide_circle.cpp
src/collision/b2_collide_edge.cpp
src/collision/b2_collide_polygon.cpp
src/collision/b2_collision.cpp
src/collision/b2_distance.cpp
src/collision/b2_dynamic_tree.cpp
src/collision/b2_edge_shape.cpp
src/collision/b2_polygon_shape.cpp
src/collision/b2_time_of_impact.cpp
src/common/b2_block_allocator.cpp
src/common/b2_draw.cpp
src/common/b2_math.cpp
src/common/b2_settings.cpp
src/common/b2_stack_allocator.cpp
src/common/b2_timer.cpp
src/dynamics/b2_body.cpp
src/dynamics/b2_chain_circle_contact.cpp
src/dynamics/b2_chain_circle_contact.h
src/dynamics/b2_chain_polygon_contact.cpp
src/dynamics/b2_chain_polygon_contact.h
src/dynamics/b2_circle_contact.cpp
src/dynamics/b2_circle_contact.h
src/dynamics/b2_contact.cpp
src/dynamics/b2_contact_manager.cpp
src/dynamics/b2_contact_solver.cpp
src/dynamics/b2_contact_solver.h
src/dynamics/b2_distance_joint.cpp
src/dynamics/b2_edge_circle_contact.cpp
src/dynamics/b2_edge_circle_contact.h
src/dynamics/b2_edge_polygon_contact.cpp
src/dynamics/b2_edge_polygon_contact.h
src/dynamics/b2_fixture.cpp
src/dynamics/b2_friction_joint.cpp
src/dynamics/b2_gear_joint.cpp
src/dynamics/b2_island.cpp
src/dynamics/b2_island.h
src/dynamics/b2_joint.cpp
src/dynamics/b2_motor_joint.cpp
src/dynamics/b2_mouse_joint.cpp
src/dynamics/b2_polygon_circle_contact.cpp
src/dynamics/b2_polygon_circle_contact.h
src/dynamics/b2_polygon_contact.cpp
src/dynamics/b2_polygon_contact.h
src/dynamics/b2_prismatic_joint.cpp
src/dynamics/b2_pulley_joint.cpp
src/dynamics/b2_revolute_joint.cpp
src/dynamics/b2_weld_joint.cpp
src/dynamics/b2_wheel_joint.cpp
src/dynamics/b2_world.cpp
src/dynamics/b2_world_callbacks.cpp
src/rope/b2_rope.cpp)
FILE(GLOB_RECURSE box2d_sources *.h;*.c)

set(BOX2D_HEADER_FILES
include/box2d/b2_api.h
include/box2d/b2_block_allocator.h
include/box2d/b2_body.h
include/box2d/b2_broad_phase.h
include/box2d/b2_chain_shape.h
include/box2d/b2_circle_shape.h
include/box2d/b2_collision.h
include/box2d/b2_common.h
include/box2d/b2_contact.h
include/box2d/b2_contact_manager.h
include/box2d/b2_distance.h
include/box2d/b2_distance_joint.h
include/box2d/b2_draw.h
include/box2d/b2_dynamic_tree.h
include/box2d/b2_edge_shape.h
include/box2d/b2_fixture.h
include/box2d/b2_friction_joint.h
include/box2d/b2_gear_joint.h
include/box2d/b2_growable_stack.h
include/box2d/b2_joint.h
include/box2d/b2_math.h
include/box2d/b2_motor_joint.h
include/box2d/b2_mouse_joint.h
include/box2d/b2_polygon_shape.h
include/box2d/b2_prismatic_joint.h
include/box2d/b2_pulley_joint.h
include/box2d/b2_revolute_joint.h
include/box2d/b2_rope.h
include/box2d/b2_settings.h
include/box2d/b2_shape.h
include/box2d/b2_stack_allocator.h
include/box2d/b2_time_of_impact.h
include/box2d/b2_timer.h
include/box2d/b2_time_step.h
include/box2d/b2_types.h
include/box2d/b2_weld_joint.h
include/box2d/b2_wheel_joint.h
include/box2d/b2_world.h
include/box2d/b2_world_callbacks.h
include/box2d/box2d.h)
add_library(${target_name} STATIC ${box2d_sources})

add_library(${target_name} STATIC ${BOX2D_SOURCE_FILES} ${BOX2D_HEADER_FILES})
# Atomics are still considered experimental in Visual Studio 17.8
if (FULL_MSVC)
target_compile_options(box2d PRIVATE /experimental:c11atomics)
endif()

set_target_properties(${target_name} PROPERTIES C_STANDARD 17 C_STANDARD_REQUIRED TRUE)

target_include_directories(${target_name}
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include"
Expand Down
52 changes: 0 additions & 52 deletions 3rdparty/box2d/include/box2d/b2_api.h

This file was deleted.

60 changes: 0 additions & 60 deletions 3rdparty/box2d/include/box2d/b2_block_allocator.h

This file was deleted.

Loading

0 comments on commit 630f361

Please sign in to comment.