-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
151 lines (137 loc) · 5.3 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
cmake_minimum_required (VERSION 3.10.2)
##### PLUGIN NAME #####
set(pluginname gipBulletPhysics)
##### PLUGIN PATHS #####
set(PLUGIN_DIR ${PLUGINS_DIR}/${pluginname})
set(PLUGIN_LIBS_DIR ${PLUGIN_DIR}/libs)
##### PLUGIN SOURCES #####
list(APPEND PLUGIN_SRCS
${PLUGIN_DIR}/src/gipBulletPhysics.cpp
${PLUGIN_DIR}/src/gipDebugDraw.cpp
${PLUGIN_DIR}/src/gipBaseGameObject.cpp
${PLUGIN_DIR}/src/gImageGameObject.cpp
${PLUGIN_DIR}/src/gModelGameObject.cpp
${PLUGIN_DIR}/src/gGhostImageGameObject.cpp
${PLUGIN_DIR}/src/gGhostModelGameObject.cpp
)
##### PLUGIN HEADERS #####
list(APPEND PLUGIN_INCLUDES
${PLUGIN_DIR}/src
)
if(WIN32)
list(APPEND PLUGIN_INCLUDES
${PLUGIN_DIR}/src
${PLUGIN_LIBS_DIR}/include
${PLUGIN_LIBS_DIR}/include/bullet
${PLUGIN_LIBS_DIR}/include/bullet/Bullet2FileLoader
${PLUGIN_LIBS_DIR}/include/bullet/Bullet2FileLoader/autogenerated
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Collision/BroadPhaseCollision
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Collision/BroadPhaseCollision/shared
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Collision/NarrowPhaseCollision
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Collision/NarrowPhaseCollision/shared
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Common
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Common/shared
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Dynamics
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Dynamics/ConstraintSolver
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Dynamics/shared
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3Geometry
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/BroadPhaseCollision
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/BroadPhaseCollision/kernels
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/Initialize
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/NarrowphaseCollision
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/NarrowphaseCollision/kernels
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/ParallelPrimitives
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/ParallelPrimitives/kernels
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/Raycast
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/Raycast/kernels
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/Rigidbody
${PLUGIN_LIBS_DIR}/include/bullet/Bullet3OpenCL/Rigidbody/kernels
${PLUGIN_LIBS_DIR}/include/bullet/BulletCollision
${PLUGIN_LIBS_DIR}/include/bullet/BulletCollision/BroadPhaseCollision
${PLUGIN_LIBS_DIR}/include/bullet/BulletCollision/CollisionDispatch
${PLUGIN_LIBS_DIR}/include/bullet/BulletCollision/CollisionShapes
${PLUGIN_LIBS_DIR}/include/bullet/BulletCollision/Gimpact
${PLUGIN_LIBS_DIR}/include/bullet/BulletCollision/NarrowPhaseCollision
${PLUGIN_LIBS_DIR}/include/bullet/BulletDynamics
${PLUGIN_LIBS_DIR}/include/bullet/BulletDynamics/Character
${PLUGIN_LIBS_DIR}/include/bullet/BulletDynamics/ConstraintSolver
${PLUGIN_LIBS_DIR}/include/bullet/BulletDynamics/Dynamics
${PLUGIN_LIBS_DIR}/include/bullet/BulletDynamics/Featherstone
${PLUGIN_LIBS_DIR}/include/bullet/BulletDynamics/MLCPSolvers
${PLUGIN_LIBS_DIR}/include/bullet/BulletDynamics/Vehicle
${PLUGIN_LIBS_DIR}/include/bullet/BulletFileLoader
${PLUGIN_LIBS_DIR}/include/bullet/BulletFileLoader/autogenerated
${PLUGIN_LIBS_DIR}/include/bullet/BulletInverseDynamics
${PLUGIN_LIBS_DIR}/include/bullet/BulletSoftBody
${PLUGIN_LIBS_DIR}/include/bullet/BulletWorldImporter
${PLUGIN_LIBS_DIR}/include/bullet/BulletXmlWorldImporter
${PLUGIN_LIBS_DIR}/include/bullet/ConvexDecomposition
${PLUGIN_LIBS_DIR}/include/bullet/GIMPACTUtils
${PLUGIN_LIBS_DIR}/include/bullet/HACD
${PLUGIN_LIBS_DIR}/include/bullet/InverseDynamics
${PLUGIN_LIBS_DIR}/include/bullet/LinearMath
${PLUGIN_LIBS_DIR}/include/GL
${PLUGIN_LIBS_DIR}/include/openvr
)
endif(WIN32)
##### PLUGIN DEPENDENCY LOCATIONS (IF ANY) #####
if(WIN32)
list(APPEND PLUGIN_LINKDIRS
${PLUGIN_LIBS_DIR}/lib/win32
${PLUGIN_LIBS_DIR}/bin
)
#set(PLUGIN_LIBDIRS ${PLUGIN_LIBS_DIR}/lib/win32)
list(APPEND PLUGIN_LIBDIRS
${PLUGIN_LIBS_DIR}/lib/win32
)
elseif(LINUX)
#Linux libs here
elseif(APPLE)
#Macos libs here
find_package(Bullet REQUIRED)
message(STATUS "Bullet found: ${BULLET_FOUND}")
message(STATUS "Bullet include dirs: ${BULLET_INCLUDE_DIRS}")
message(STATUS "Bullet libraries: ${BULLET_LIBRARIES}")
list(APPEND PLUGIN_INCLUDES ${BULLET_INCLUDE_DIRS})
list(APPEND PLUGIN_LINKLIBS ${BULLET_LIBRARIES})
endif(WIN32)
##### PLUGIN DEPENDENCY LINKING (IF ANY) #####
if(WIN32)
list(APPEND PLUGIN_LINKLIBS
#Lib names
LinearMath
Bullet3Common
BulletInverseDynamics
BulletCollision
BulletDynamics
BulletSoftBody
Bullet2FileLoader
Bullet3Collision
Bullet3Dynamics
Bullet3Geometry
Bullet3OpenCL_clew
BulletExampleBrowserLib
BulletFileLoader
BulletInverseDynamicsUtils
BulletRobotics
BulletWorldImporter
BulletXmlWorldImporter
BussIK
clsocket
ConvexDecomposition
freeglut
GIMPACTUtils
gwen
HACD
openvr_api
)
elseif(LINUX)
list(APPEND PLUGIN_LINKLIBS
#Lib names
)
elseif(APPLE)
list(APPEND PLUGIN_LINKLIBS
#Lib names
)
endif(WIN32)