-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
107 lines (94 loc) · 3.35 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
cmake_minimum_required(VERSION 3.23)
project(GMBullet)
set(CMAKE_CXX_STANDARD 17)
set(SOURCES
src/GMBullet/dllmain.cpp
src/GMBullet/exports_btAxisSweep3.cpp
src/GMBullet/exports_btBoxShape.cpp
src/GMBullet/exports_btBvhTriangleMeshShape.cpp
src/GMBullet/exports_btCapsuleShape.cpp
src/GMBullet/exports_btClosestNotMeRayResultCallback.cpp
src/GMBullet/exports_btCollisionDispatcher.cpp
src/GMBullet/exports_btCollisionObject.cpp
src/GMBullet/exports_btCollisionShape.cpp
src/GMBullet/exports_btCollisionWorld.cpp
src/GMBullet/exports_btCompoundShape.cpp
src/GMBullet/exports_btConeShape.cpp
src/GMBullet/exports_btConeTwistConstraint.cpp
src/GMBullet/exports_btCylinderShape.cpp
src/GMBullet/exports_btDbvtBroadphase.cpp
src/GMBullet/exports_btDebugDrawInMemory.cpp
src/GMBullet/exports_btDefaultCollisionConfiguration.cpp
src/GMBullet/exports_btDefaultMotionState.cpp
src/GMBullet/exports_btDiscreteDynamicsWorld.cpp
src/GMBullet/exports_btDispatcher.cpp
src/GMBullet/exports_btFixedConstraint.cpp
src/GMBullet/exports_btGearConstraint.cpp
src/GMBullet/exports_btGeneric6DofConstraint.cpp
src/GMBullet/exports_btGeneric6DofSpring2Constraint.cpp
src/GMBullet/exports_btGeneric6DofSpringConstraint.cpp
src/GMBullet/exports_btHeightfieldTerrainShape.cpp
src/GMBullet/exports_btHinge2Constraint.cpp
src/GMBullet/exports_btHingeConstraint.cpp
src/GMBullet/exports_btIDebugDraw.cpp
src/GMBullet/exports_btPoint2PointConstraint.cpp
src/GMBullet/exports_btQuaternion.cpp
src/GMBullet/exports_btRaycastVehicle.cpp
src/GMBullet/exports_btRigidBody.cpp
src/GMBullet/exports_btSequentialImpulseConstraintSolver.cpp
src/GMBullet/exports_btSliderConstraint.cpp
src/GMBullet/exports_btSphereShape.cpp
src/GMBullet/exports_btTransform.cpp
src/GMBullet/exports_btTriangleMesh.cpp
src/GMBullet/exports_btTypedConstraint.cpp
src/GMBullet/exports_btUniversalConstraint.cpp
src/GMBullet/exports_btVector3.cpp
src/GMBullet/exports_btWheelInfo.cpp
)
set(PATH_BULLET "${CMAKE_CURRENT_SOURCE_DIR}/bullet3")
set(PATH_BULLET_BUILD "${PATH_BULLET}/build")
set(PATH_BULLET_INCLUDE "${PATH_BULLET}/src")
find_library(LIBBULLETCOLLISION
NAMES BulletCollision
PATHS ${PATH_BULLET_BUILD}
PATH_SUFFIXES "src/BulletCollision/" "lib/Release/"
NO_CACHE
REQUIRED
NO_DEFAULT_PATH
)
find_library(LIBBULLETDYNAMICS
NAMES BulletDynamics
PATHS ${PATH_BULLET_BUILD}
PATH_SUFFIXES "src/BulletDynamics/" "lib/Release/"
NO_CACHE
REQUIRED
NO_DEFAULT_PATH
)
find_library(LIBLINEARMATH
NAMES LinearMath
PATHS ${PATH_BULLET_BUILD}
PATH_SUFFIXES "src/LinearMath/" "lib/Release/"
NO_CACHE
REQUIRED
NO_DEFAULT_PATH
)
add_library(${PROJECT_NAME} SHARED ${SOURCES})
if(WIN32)
add_definitions(-DOS_Windows)
endif()
set_property(TARGET ${PROJECT_NAME} PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded")
target_include_directories(${PROJECT_NAME} PRIVATE include/
${PATH_BULLET_INCLUDE}
)
target_link_libraries(${PROJECT_NAME}
${LIBBULLETCOLLISION}
${LIBBULLETDYNAMICS}
${LIBLINEARMATH}
)
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${PROJECT_NAME}>
${CMAKE_CURRENT_SOURCE_DIR}/extensions/${PROJECT_NAME}/
)