Cosmetic: Cosmetic corrections in the PR Joint
[ode.git] / CMakeLists.txt
blobf0e910fe2d4c26ac28a45ea3394fdb999da2a689
1 cmake_minimum_required(VERSION 2.8.12)
3 if(POLICY CMP0042)
4         cmake_policy(SET CMP0042 NEW)
5 endif()
7 if(POLICY CMP0072)
8         cmake_policy(SET CMP0072 NEW)
9 endif()
11 if(POLICY CMP0075)
12         cmake_policy(SET CMP0075 NEW)
13 endif()
15 project(ODE)
17 include(CheckFunctionExists)
18 include(CheckIncludeFiles)
19 include(CMakeDependentOption)
20 include(CMakePushCheckState)
21 include(GNUInstallDirs)
23 set(SOVERSION_MAJOR 8)
24 set(SOVERSION_MINOR 0)
25 set(SOVERSION_PATCH 0)
26 set(SOVERSION ${SOVERSION_MAJOR}.${SOVERSION_MINOR}.${SOVERSION_PATCH})
28 set(VERSION_MAJOR 0)
29 set(VERSION_MINOR 16)
30 set(VERSION_PATCH 0)
31 set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
33 option(BUILD_SHARED_LIBS "Build shared libraries." ON)
34 option(ODE_16BIT_INDICES "Use 16-bit indices for trimeshes (default is 32-bit)." OFF)
35 option(ODE_NO_BUILTIN_THREADING_IMPL "Disable built-in multithreaded threading implementation." OFF)
36 option(ODE_NO_THREADING_INTF "Disable threading interface support (external implementations cannot be assigned." OFF)
37 option(ODE_OLD_TRIMESH "Use old OPCODE trimesh-trimesh collider." OFF)
38 option(ODE_WITH_DEMOS "Builds the demo applications and DrawStuff library." ON)
39 option(ODE_WITH_GIMPACT "Use GIMPACT for trimesh collisions (experimental)." OFF)
40 option(ODE_WITH_LIBCCD "Use libccd for handling some collision tests absent in ODE." OFF)
41 option(ODE_WITH_OPCODE "Use old OPCODE trimesh-trimesh collider." ON)
42 option(ODE_WITH_OU "Use TLS for global caches (allows threaded collision checks for separated spaces)." OFF)
43 option(ODE_WITH_TESTS "Builds the unit test application." ON)
45 cmake_dependent_option(ODE_WITH_LIBCCD_BOX_CYL "Use libccd for box-cylinder." ON "ODE_WITH_LIBCCD" OFF)
46 cmake_dependent_option(ODE_WITH_LIBCCD_CAP_CYL "Use libccd for capsule-cylinder." ON "ODE_WITH_LIBCCD" OFF)
47 cmake_dependent_option(ODE_WITH_LIBCCD_CYL_CYL "Use libccd for cylinder-cylinder." ON "ODE_WITH_LIBCCD" OFF)
48 cmake_dependent_option(ODE_WITH_LIBCCD_CONVEX_BOX "Use libccd for convex-box." ON "ODE_WITH_LIBCCD" OFF)
49 cmake_dependent_option(ODE_WITH_LIBCCD_CONVEX_CAP "Use libccd for convex-capsule." ON "ODE_WITH_LIBCCD" OFF)
50 cmake_dependent_option(ODE_WITH_LIBCCD_CONVEX_CONVEX "Use libccd for convex-convex." ON "ODE_WITH_LIBCCD" OFF)
51 cmake_dependent_option(ODE_WITH_LIBCCD_CONVEX_CYL "Use libccd for convex-cylinder." ON "ODE_WITH_LIBCCD" OFF)
52 cmake_dependent_option(ODE_WITH_LIBCCD_CONVEX_SPHERE "Use libccd for convex-sphere." ON "ODE_WITH_LIBCCD" OFF)
53 cmake_dependent_option(ODE_WITH_LIBCCD_SYSTEM "Use system libccd." OFF "ODE_WITH_LIBCCD" OFF)
55 if(CMAKE_SIZEOF_VOID_P EQUAL 4)
56         option(ODE_DOUBLE_PRECISION "Use double-precision math." OFF)
57 else()
58         option(ODE_DOUBLE_PRECISION "Use double-precision math." ON)
59 endif()
61 cmake_push_check_state(RESET)
63 if(ODE_WITH_DEMOS)
64         find_package(OpenGL REQUIRED)
65         list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR})
66         list(APPEND CMAKE_REQUIRED_LIBRARIES ${OPENGL_LIBRARIES})
67 endif()
69 if(ODE_WITH_OU OR NOT ODE_NO_THREADING_INTF)
70         find_package(Threads REQUIRED)
71         list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
72 endif()
74 if(APPLE)
75         check_include_files("OpenGL/gl.h;OpenGL/glu.h" HAVE_APPLE_OPENGL_FRAMEWORK)
76 endif()
77 check_include_files(alloca.h HAVE_ALLOCA_H)
78 check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
79 check_include_files(inttypes.h HAVE_INTTYPES_H)
80 check_function_exists(isnan HAVE_ISNAN)
81 check_function_exists(isnanf HAVE_ISNANF)
82 check_include_files(malloc.h HAVE_MALLOC_H)
83 check_function_exists(pthread_attr_setstacklazy HAVE_PTHREAD_ATTR_SETSTACKLAZY)
84 check_function_exists(pthread_condattr_setclock HAVE_PTHREAD_CONDATTR_SETCLOCK)
85 check_include_files(stdint.h HAVE_STDINT_H)
86 check_include_files(sys/time.h HAVE_SYS_TIME_H)
87 check_include_files(sys/types.h HAVE_SYS_TYPES_H)
88 check_include_files(unistd.h HAVE_UNISTD_H)
89 check_function_exists(_isnan HAVE__ISNAN)
90 check_function_exists(_isnanf HAVE__ISNANF)
91 check_function_exists(__isnan HAVE___ISNAN)
92 check_function_exists(__isnanf HAVE___ISNANF)
93 if(APPLE)
94         set(MAC_OS_X_VERSION 1000)
95         check_function_exists(OSAtomicAdd32Barrier MAC_OS_X_VERSION_1040)
96         if(MAC_OS_X_VERSION_1040)
97                 set(MAC_OS_X_VERSION 1040)
98         endif()
99         check_function_exists(OSAtomicAnd32OrigBarrier MAC_OS_X_VERSION_1050)
100         if(MAC_OS_X_VERSION_1050)
101                 set(MAC_OS_X_VERSION 1050)
102         endif()
103 endif()
104 if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|x86.*|x86_64.*|amd64.*|AMD64.*")
105         set(PENTIUM ON)
106 endif()
107 if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64.*|amd64.*|AMD64.*")
108         set(X86_64_SYSTEM ON)
109 endif()
110 if(ODE_WITH_OU)
111         set(_OU_FEATURE_SET _OU_FEATURE_SET_TLS)
112 elseif(NOT ODE_NO_THREADING_INTF)
113         set(_OU_FEATURE_SET _OU_FEATURE_SET_ATOMICS)
114 else()
115         set(_OU_FEATURE_SET _OU_FEATURE_SET_BASICS)
116 endif()
117 set(_OU_NAMESPACE odeou)
118 if(WIN32 OR CYGWIN)
119         set(_OU_TARGET_OS _OU_TARGET_OS_WINDOWS)
120 elseif(APPLE)
121         set(_OU_TARGET_OS _OU_TARGET_OS_MAC)
122 elseif(QNXNTO)
123         set(_OU_TARGET_OS _OU_TARGET_OS_QNX)
124 elseif(CMAKE_SYSTEM MATCHES "SunOS-4")
125         set(_OU_TARGET_OS _OU_TARGET_OS_SUNOS)
126 else()
127         set(_OU_TARGET_OS _OU_TARGET_OS_GENUNIX)
128 endif()
130 cmake_pop_check_state()
132 configure_file(config.h.cmake.in ode/src/config.h)
134 if(ODE_DOUBLE_PRECISION)
135         set(CCD_PRECISION CCD_DOUBLE)
136         set(ODE_PRECISION dDOUBLE)
137 else()
138         set(CCD_PRECISION CCD_SINGLE)
139         set(ODE_PRECISION dSINGLE)
140 endif()
142 configure_file(libccd/src/ccd/precision.h.in include/ccd/precision.h)
143 configure_file(include/ode/precision.h.in include/ode/precision.h)
145 set(ODE_VERSION ${VERSION})
147 configure_file(include/ode/version.h.in include/ode/version.h)
149 set(
150         HDRS
151         include/ode/collision.h
152         include/ode/collision_space.h
153         include/ode/collision_trimesh.h
154         include/ode/common.h
155         include/ode/compatibility.h
156         include/ode/contact.h
157         include/ode/cooperative.h
158         include/ode/error.h
159         include/ode/export-dif.h
160         include/ode/mass.h
161         include/ode/matrix.h
162         include/ode/matrix_coop.h
163         include/ode/memory.h
164         include/ode/misc.h
165         include/ode/objects.h
166         include/ode/ode.h
167         include/ode/odeconfig.h
168         include/ode/odecpp.h
169         include/ode/odecpp_collision.h
170         include/ode/odeinit.h
171         include/ode/odemath.h
172         include/ode/odemath_legacy.h
173         include/ode/rotation.h
174         include/ode/threading.h
175         include/ode/threading_impl.h
176         include/ode/timer.h
177         ${CMAKE_CURRENT_BINARY_DIR}/include/ode/precision.h
178         ${CMAKE_CURRENT_BINARY_DIR}/include/ode/version.h
181 set(
182         SRCS
183         ode/src/array.cpp
184         ode/src/array.h
185         ode/src/box.cpp
186         ode/src/capsule.cpp
187         ode/src/collision_cylinder_box.cpp
188         ode/src/collision_cylinder_plane.cpp
189         ode/src/collision_cylinder_sphere.cpp
190         ode/src/collision_kernel.cpp
191         ode/src/collision_kernel.h
192         ode/src/collision_quadtreespace.cpp
193         ode/src/collision_sapspace.cpp
194         ode/src/collision_space.cpp
195         ode/src/collision_space_internal.h
196         ode/src/collision_std.h
197         ode/src/collision_transform.cpp
198         ode/src/collision_transform.h
199         ode/src/collision_trimesh_colliders.h
200         ode/src/collision_trimesh_disabled.cpp
201         ode/src/collision_trimesh_gimpact.h
202         ode/src/collision_trimesh_internal.h
203         ode/src/collision_trimesh_opcode.h
204         ode/src/collision_util.cpp
205         ode/src/collision_util.h
206         ode/src/common.h
207         ode/src/convex.cpp
208         ode/src/coop_matrix_types.h
209         ode/src/cylinder.cpp
210         ode/src/default_threading.cpp
211         ode/src/default_threading.h
212         ode/src/error.cpp
213         ode/src/error.h
214         ode/src/export-dif.cpp
215         ode/src/fastdot.cpp
216         ode/src/fastdot_impl.h
217         ode/src/fastldltfactor.cpp
218         ode/src/fastldltfactor_impl.h
219         ode/src/fastldltsolve.cpp
220         ode/src/fastldltsolve_impl.h
221         ode/src/fastlsolve.cpp
222         ode/src/fastlsolve_impl.h
223         ode/src/fastltsolve.cpp
224         ode/src/fastltsolve_impl.h
225         ode/src/fastvecscale.cpp
226         ode/src/fastvecscale_impl.h
227         ode/src/heightfield.cpp
228         ode/src/heightfield.h
229         ode/src/lcp.cpp
230         ode/src/lcp.h
231         ode/src/mass.cpp
232         ode/src/mat.cpp
233         ode/src/mat.h
234         ode/src/matrix.cpp
235         ode/src/matrix.h
236         ode/src/memory.cpp
237         ode/src/misc.cpp
238         ode/src/nextafterf.c
239         ode/src/objects.cpp
240         ode/src/objects.h
241         ode/src/obstack.cpp
242         ode/src/obstack.h
243         ode/src/ode.cpp
244         ode/src/odeinit.cpp
245         ode/src/odemath.cpp
246         ode/src/odemath.h
247         ode/src/odeou.h
248         ode/src/odetls.h
249         ode/src/plane.cpp
250         ode/src/quickstep.cpp
251         ode/src/quickstep.h
252         ode/src/ray.cpp
253         ode/src/resource_control.cpp
254         ode/src/resource_control.h
255         ode/src/rotation.cpp
256         ode/src/simple_cooperative.cpp
257         ode/src/simple_cooperative.h
258         ode/src/sphere.cpp
259         ode/src/step.cpp
260         ode/src/step.h
261         ode/src/threaded_solver_ldlt.h
262         ode/src/threading_atomics_provs.h
263         ode/src/threading_base.cpp
264         ode/src/threading_base.h
265         ode/src/threading_fake_sync.h
266         ode/src/threading_impl.cpp
267         ode/src/threading_impl.h
268         ode/src/threading_impl_posix.h
269         ode/src/threading_impl_templates.h
270         ode/src/threading_impl_win.h
271         ode/src/threading_pool_posix.cpp
272         ode/src/threading_pool_win.cpp
273         ode/src/threadingutils.h
274         ode/src/timer.cpp
275         ode/src/typedefs.h
276         ode/src/util.cpp
277         ode/src/util.h
278         ode/src/joints/amotor.cpp
279         ode/src/joints/amotor.h
280         ode/src/joints/ball.cpp
281         ode/src/joints/ball.h
282         ode/src/joints/contact.cpp
283         ode/src/joints/contact.h
284         ode/src/joints/dball.cpp
285         ode/src/joints/dball.h
286         ode/src/joints/dhinge.cpp
287         ode/src/joints/dhinge.h
288         ode/src/joints/fixed.cpp
289         ode/src/joints/fixed.h
290         ode/src/joints/hinge.cpp
291         ode/src/joints/hinge.h
292         ode/src/joints/hinge2.cpp
293         ode/src/joints/hinge2.h
294         ode/src/joints/joint.cpp
295         ode/src/joints/joint.h
296         ode/src/joints/joint_internal.h
297         ode/src/joints/joints.h
298         ode/src/joints/lmotor.cpp
299         ode/src/joints/lmotor.h
300         ode/src/joints/null.cpp
301         ode/src/joints/null.h
302         ode/src/joints/piston.cpp
303         ode/src/joints/piston.h
304         ode/src/joints/plane2d.cpp
305         ode/src/joints/plane2d.h
306         ode/src/joints/pr.cpp
307         ode/src/joints/pr.h
308         ode/src/joints/pu.cpp
309         ode/src/joints/pu.h
310         ode/src/joints/slider.cpp
311         ode/src/joints/slider.h
312         ode/src/joints/transmission.cpp
313         ode/src/joints/transmission.h
314         ode/src/joints/universal.cpp
315         ode/src/joints/universal.h
318 if(ODE_WITH_GIMPACT AND NOT ODE_NO_TRIMESH)
319         list(
320                 APPEND SRCS
321                 GIMPACT/src/gim_boxpruning.cpp
322                 GIMPACT/src/gim_contact.cpp
323                 GIMPACT/src/gim_math.cpp
324                 GIMPACT/src/gim_memory.cpp
325                 GIMPACT/src/gim_tri_tri_overlap.cpp
326                 GIMPACT/src/gim_trimesh.cpp
327                 GIMPACT/src/gim_trimesh_capsule_collision.cpp
328                 GIMPACT/src/gim_trimesh_ray_collision.cpp
329                 GIMPACT/src/gim_trimesh_sphere_collision.cpp
330                 GIMPACT/src/gim_trimesh_trimesh_collision.cpp
331                 GIMPACT/src/gimpact.cpp
332                 ode/src/collision_convex_trimesh.cpp
333                 ode/src/collision_cylinder_trimesh.cpp
334                 ode/src/collision_trimesh_box.cpp
335                 ode/src/collision_trimesh_ccylinder.cpp
336                 ode/src/collision_trimesh_gimpact.cpp
337                 ode/src/collision_trimesh_internal.cpp
338                 ode/src/collision_trimesh_internal_impl.h
339                 ode/src/collision_trimesh_internal.h
340                 ode/src/collision_trimesh_plane.cpp
341                 ode/src/collision_trimesh_ray.cpp
342                 ode/src/collision_trimesh_sphere.cpp
343                 ode/src/collision_trimesh_trimesh.cpp
344                 ode/src/gimpact_contact_export_helper.cpp
345                 ode/src/gimpact_contact_export_helper.h
346                 ode/src/gimpact_gim_contact_accessor.h
347                 ode/src/gimpact_plane_contact_accessor.h
348         )
349 endif()
351 if(ODE_WITH_LIBCCD)
352         if(NOT ODE_WITH_LIBCCD_SYSTEM)
353                 list(
354                         APPEND SRCS
355                         libccd/src/alloc.c
356                         libccd/src/ccd.c
357                         libccd/src/mpr.c
358                         libccd/src/polytope.c
359                         libccd/src/support.c
360                         libccd/src/vec3.c
361                         libccd/src/ccd/alloc.h
362                         libccd/src/ccd/ccd.h
363                         libccd/src/ccd/compiler.h
364                         libccd/src/ccd/dbg.h
365                         libccd/src/ccd/list.h
366                         libccd/src/ccd/quat.h
367                         libccd/src/ccd/polytope.h
368                         libccd/src/ccd/simplex.h
369                         libccd/src/ccd/support.h
370                         libccd/src/ccd/vec3.h
371                         libccd/src/custom/ccdcustom/quat.h
372                         libccd/src/custom/ccdcustom/vec3.h
373                 )
374         endif()
375         
376         list(
377                 APPEND SRCS
378                 ode/src/collision_libccd.cpp
379                 ode/src/collision_libccd.h
380         )
381 endif()
383 if(ODE_WITH_OPCODE AND NOT ODE_NO_TRIMESH)
384         list(
385                 APPEND SRCS
386                 ode/src/collision_convex_trimesh.cpp
387                 ode/src/collision_cylinder_trimesh.cpp
388                 ode/src/collision_trimesh_box.cpp
389                 ode/src/collision_trimesh_ccylinder.cpp
390                 ode/src/collision_trimesh_internal.cpp
391                 ode/src/collision_trimesh_internal_impl.h
392                 ode/src/collision_trimesh_internal.h
393                 ode/src/collision_trimesh_opcode.cpp
394                 ode/src/collision_trimesh_plane.cpp
395                 ode/src/collision_trimesh_ray.cpp
396                 ode/src/collision_trimesh_sphere.cpp
397                 ode/src/collision_trimesh_trimesh.cpp
398                 ode/src/collision_trimesh_trimesh_old.cpp
399                 OPCODE/OPC_AABBCollider.cpp
400                 OPCODE/OPC_AABBCollider.h
401                 OPCODE/OPC_AABBTree.cpp
402                 OPCODE/OPC_AABBTree.h
403                 OPCODE/OPC_BaseModel.cpp
404                 OPCODE/OPC_BaseModel.h
405                 OPCODE/OPC_BoxBoxOverlap.h
406                 OPCODE/OPC_Collider.cpp
407                 OPCODE/OPC_Collider.h
408                 OPCODE/OPC_Common.cpp
409                 OPCODE/OPC_Common.h
410                 OPCODE/OPC_HybridModel.cpp
411                 OPCODE/OPC_HybridModel.h
412                 OPCODE/OPC_IceHook.h
413                 OPCODE/OPC_LSSAABBOverlap.h
414                 OPCODE/OPC_LSSCollider.cpp
415                 OPCODE/OPC_LSSCollider.h
416                 OPCODE/OPC_LSSTriOverlap.h
417                 OPCODE/OPC_MeshInterface.cpp
418                 OPCODE/OPC_MeshInterface.h
419                 OPCODE/OPC_Model.cpp
420                 OPCODE/OPC_Model.h
421                 OPCODE/OPC_OBBCollider.cpp
422                 OPCODE/OPC_OBBCollider.h
423                 OPCODE/OPC_OptimizedTree.cpp
424                 OPCODE/OPC_OptimizedTree.h
425                 OPCODE/OPC_Picking.cpp
426                 OPCODE/OPC_Picking.h
427                 OPCODE/OPC_PlanesAABBOverlap.h
428                 OPCODE/OPC_PlanesCollider.cpp
429                 OPCODE/OPC_PlanesCollider.h
430                 OPCODE/OPC_PlanesTriOverlap.h
431                 OPCODE/OPC_RayAABBOverlap.h
432                 OPCODE/OPC_RayCollider.cpp
433                 OPCODE/OPC_RayCollider.h
434                 OPCODE/OPC_RayTriOverlap.h
435                 OPCODE/OPC_Settings.h
436                 OPCODE/OPC_SphereAABBOverlap.h
437                 OPCODE/OPC_SphereCollider.cpp
438                 OPCODE/OPC_SphereCollider.h
439                 OPCODE/OPC_SphereTriOverlap.h
440                 OPCODE/OPC_TreeBuilders.cpp
441                 OPCODE/OPC_TreeBuilders.h
442                 OPCODE/OPC_TreeCollider.cpp
443                 OPCODE/OPC_TreeCollider.h
444                 OPCODE/OPC_TriBoxOverlap.h
445                 OPCODE/OPC_TriTriOverlap.h
446                 OPCODE/OPC_VolumeCollider.cpp
447                 OPCODE/OPC_VolumeCollider.h
448                 OPCODE/Opcode.cpp
449                 OPCODE/Opcode.h
450                 OPCODE/Stdafx.h
451                 OPCODE/Ice/IceAABB.cpp
452                 OPCODE/Ice/IceAABB.h
453                 OPCODE/Ice/IceAxes.h
454                 OPCODE/Ice/IceBoundingSphere.h
455                 OPCODE/Ice/IceContainer.cpp
456                 OPCODE/Ice/IceContainer.h
457                 OPCODE/Ice/IceFPU.h
458                 OPCODE/Ice/IceHPoint.cpp
459                 OPCODE/Ice/IceHPoint.h
460                 OPCODE/Ice/IceIndexedTriangle.cpp
461                 OPCODE/Ice/IceIndexedTriangle.h
462                 OPCODE/Ice/IceLSS.h
463                 OPCODE/Ice/IceMatrix3x3.cpp
464                 OPCODE/Ice/IceMatrix3x3.h
465                 OPCODE/Ice/IceMatrix4x4.cpp
466                 OPCODE/Ice/IceMatrix4x4.h
467                 OPCODE/Ice/IceMemoryMacros.h
468                 OPCODE/Ice/IceOBB.cpp
469                 OPCODE/Ice/IceOBB.h
470                 OPCODE/Ice/IcePairs.h
471                 OPCODE/Ice/IcePlane.cpp
472                 OPCODE/Ice/IcePlane.h
473                 OPCODE/Ice/IcePoint.cpp
474                 OPCODE/Ice/IcePoint.h
475                 OPCODE/Ice/IcePreprocessor.h
476                 OPCODE/Ice/IceRandom.cpp
477                 OPCODE/Ice/IceRandom.h
478                 OPCODE/Ice/IceRay.cpp
479                 OPCODE/Ice/IceRay.h
480                 OPCODE/Ice/IceRevisitedRadix.cpp
481                 OPCODE/Ice/IceRevisitedRadix.h
482                 OPCODE/Ice/IceSegment.cpp
483                 OPCODE/Ice/IceSegment.h
484                 OPCODE/Ice/IceTriangle.cpp
485                 OPCODE/Ice/IceTriangle.h
486                 OPCODE/Ice/IceTriList.h
487                 OPCODE/Ice/IceTypes.h
488                 OPCODE/Ice/IceUtils.cpp
489                 OPCODE/Ice/IceUtils.h
490         )
491 endif()
493 list(
494         APPEND SRCS
495         ode/src/odeou.cpp
496         ode/src/odeou.h
497         ode/src/odetls.cpp
498         ode/src/odetls.h
499         ou/src/ou/atomic.cpp
500         ou/src/ou/customization.cpp
501         ou/src/ou/malloc.cpp
502         ou/src/ou/threadlocalstorage.cpp
505 add_library(ODE ${SRCS})
507 set_target_properties(
508         ODE
509         PROPERTIES
510         OUTPUT_NAME ode
511         POSITION_INDEPENDENT_CODE ON
512         SOVERSION ${SOVERSION_MAJOR}
513         VERSION ${SOVERSION}
516 if(WIN32)
517         if(BUILD_SHARED_LIBS)
518                 set_target_properties(ODE PROPERTIES DEBUG_POSTFIX d)
519         else()
520                 set_target_properties(
521                         ODE
522                         PROPERTIES
523                         DEBUG_POSTFIX sd
524                         MINSIZEREL_POSTFIX s
525                         RELEASE_POSTFIX s
526                         RELWITHDEBINFO_POSTFIX s
527                 )
528         endif()
529         
530         if(ODE_DOUBLE_PRECISION)
531                 set_target_properties(ODE PROPERTIES OUTPUT_NAME ode_double)
532         else()
533                 set_target_properties(ODE PROPERTIES OUTPUT_NAME ode_single)
534         endif()
535 endif()
537 target_compile_definitions(
538         ODE
539         PRIVATE
540         -D_OU_NAMESPACE=${_OU_NAMESPACE}
541         -D_OU_FEATURE_SET=${_OU_FEATURE_SET}
542         -D_OU_TARGET_OS=${_OU_TARGET_OS}
543         $<$<NOT:$<CONFIG:Debug>>:dNODEBUG>
544         -DdOU_ENABLED
547 if(APPLE)
548         target_compile_definitions(ODE PRIVATE -DMAC_OS_X_VERSION=${MAC_OS_X_VERSION})
549         if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
550                 find_library(CORESERVICES_FW NAMES CoreServices)
551                 if (CORESERVICES_FW)
552                         target_link_libraries(ODE PRIVATE ${CORESERVICES_FW})
553                 endif()
554         endif()
555 endif()
557 if(WIN32)
558         target_compile_definitions(ODE PRIVATE -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES)
559 endif()
561 if(BUILD_SHARED_LIBS)
562         target_compile_definitions(ODE PRIVATE -DODE_DLL)
563 else()
564         target_compile_definitions(ODE PRIVATE -DODE_LIB)
565 endif()
567 if(ODE_DOUBLE_PRECISION)
568         target_compile_definitions(ODE PUBLIC -DdIDEDOUBLE PRIVATE -DCCD_IDEDOUBLE)
569 else()
570         target_compile_definitions(ODE PUBLIC -DdIDESINGLE PRIVATE -DCCD_IDESINGLE)
571 endif()
573 target_include_directories(
574         ODE
575         PUBLIC
576         $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
577         $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/ode/src>
578         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
579         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ode/src>
580         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ode/src/joints>
581         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ou/include>
582         $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>
585 if(ODE_16BIT_INDICES)
586         target_compile_definitions(ODE PRIVATE -DdTRIMESH_16BIT_INDICES)
587 endif()
589 if(NOT ODE_NO_BUILTIN_THREADING_IMPL)
590         target_compile_definitions(ODE PRIVATE -DdBUILTIN_THREADING_IMPL_ENABLED)
591 endif()
593 if(ODE_NO_THREADING_INTF)
594         target_compile_definitions(ODE PRIVATE -DdTHREADING_INTF_DISABLED)
595 endif()
597 if(ODE_WITH_GIMPACT AND NOT ODE_NO_TRIMESH)
598         target_compile_definitions(ODE PRIVATE -DdTRIMESH_ENABLED -DdTRIMESH_GIMPACT)
599         target_include_directories(ODE PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GIMPACT/include>)
600 endif()
602 if(ODE_WITH_LIBCCD)
603         if(ODE_WITH_LIBCCD_SYSTEM)
604                 find_package(ccd REQUIRED)
605                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_ENABLED -DdLIBCCD_SYSTEM)
606                 target_include_directories(
607                         ODE
608                         PRIVATE
609                         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libccd/src/custom>
610                 )
611                 if(TARGET ccd::ccd)
612                         target_link_libraries(ODE PRIVATE ccd::ccd)
613                 else()
614                         target_link_libraries(ODE PRIVATE ccd)
615                 endif()
616         else()
617                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_ENABLED -DdLIBCCD_INTERNAL)
618                 target_include_directories(
619                         ODE
620                         PRIVATE
621                         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libccd/src>
622                         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libccd/src/custom>
623                 )
624         endif()
625         
626         if(ODE_WITH_LIBCCD_BOX_CYL)
627                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_BOX_CYL)
628         endif()
629         
630         if(ODE_WITH_LIBCCD_CAP_CYL)
631                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_CAP_CYL)
632         endif()
633         
634         if(ODE_WITH_LIBCCD_CYL_CYL)
635                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_CYL_CYL)
636         endif()
637         
638         if(ODE_WITH_LIBCCD_CONVEX_BOX)
639                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_CONVEX_BOX)
640         endif()
641         
642         if(ODE_WITH_LIBCCD_CONVEX_CAP)
643                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_CONVEX_CAP)
644         endif()
645         
646         if(ODE_WITH_LIBCCD_CONVEX_CONVEX)
647                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_CONVEX_CONVEX)
648         endif()
649         
650         if(ODE_WITH_LIBCCD_CONVEX_CYL)
651                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_CONVEX_CYL)
652         endif()
653         
654         if(ODE_WITH_LIBCCD_CONVEX_SPHERE)
655                 target_compile_definitions(ODE PRIVATE -DdLIBCCD_CONVEX_SPHERE)
656         endif()
657 endif()
659 if(ODE_WITH_OPCODE AND NOT ODE_NO_TRIMESH)
660         target_compile_definitions(ODE PRIVATE -DdTRIMESH_ENABLED -DdTRIMESH_OPCODE)
661         
662         if(ODE_OLD_TRIMESH)
663                 target_compile_definitions(ODE PRIVATE -DdTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER)
664         endif()
665         
666         target_include_directories(
667                 ODE
668                 PRIVATE
669                 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/OPCODE>
670                 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/OPCODE/Ice>
671         )
672 endif()
674 if(ODE_WITH_OU)
675         target_compile_definitions(ODE PRIVATE -DdATOMICS_ENABLED -DdTLS_ENABLED)
676 elseif(NOT ODE_NO_THREADING_INTF)
677         target_compile_definitions(ODE PRIVATE -DdATOMICS_ENABLED)
678 endif()
680 if(ODE_WITH_OU OR NOT ODE_NO_THREADING_INTF)
681         target_link_libraries(ODE PRIVATE ${CMAKE_THREAD_LIBS_INIT})
682 endif()
684 if(NOT CMAKE_VERSION VERSION_LESS 3.12)
685         install(
686                 TARGETS ODE
687                 EXPORT ODE
688                 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development
689                 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_COMPONENT development
690                 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
691         )
692 else()
693         install(
694                 TARGETS ODE
695                 EXPORT ODE
696                 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development
697                 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_SKIP
698                 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
699         )
700         if(BUILD_SHARED_LIBS)
701                 install(
702                         TARGETS ODE
703                         EXPORT ODE
704                         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development NAMELINK_ONLY
705                 )
706         endif()
707 endif()
709 if(MSVC AND BUILD_SHARED_LIBS AND NOT CMAKE_VERSION VERSION_LESS 3.1)
710         install(FILES $<TARGET_PDB_FILE:ODE> DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug)
711 endif()
713 install(FILES ${HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ode COMPONENT development)
715 file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig" "${CMAKE_INSTALL_PREFIX}")
716 string(REGEX REPLACE "/$" "" PACKAGE_RELATIVE_PATH "${PACKAGE_RELATIVE_PATH}")
717 set(prefix "\${pcfiledir}/${PACKAGE_RELATIVE_PATH}")
718 set(exec_prefix "\${prefix}")
719 set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
720 set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
721 configure_file(ode.pc.in ode.pc @ONLY)
722 set(prefix "\$(cd \"\$(dirname \"\$0\")\"; pwd -P)/..")
723 configure_file(ode-config.in ode-config @ONLY)
725 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ode.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT development)
726 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/ode-config DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT development)
728 unset(DRAWSTUFF_RSRC)
730 if(ODE_WITH_DEMOS)
731         set(
732                 DRAWSTUFF_SRCS
733                 include/drawstuff/drawstuff.h
734                 include/drawstuff/version.h
735                 drawstuff/src/drawstuff.cpp
736                 drawstuff/src/internal.h
737         )
738         
739         if(WIN32)
740                 set(DRAWSTUFF_RSRC drawstuff/src/resources.rc)
741                 list(
742                         APPEND DRAWSTUFF_SRCS
743                         drawstuff/src/resource.h
744                         drawstuff/src/windows.cpp
745                         ${DRAWSTUFF_RSRC}
746                 )
747         elseif(APPLE)
748                 list(APPEND DRAWSTUFF_SRCS drawstuff/src/osx.cpp)
749         else()
750                 list(APPEND DRAWSTUFF_SRCS drawstuff/src/x11.cpp)
751         endif()
752         
753         add_library(drawstuff ${DRAWSTUFF_SRCS})
754         target_compile_definitions(drawstuff PUBLIC -DDRAWSTUFF_TEXTURE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/drawstuff/textures")
755         
756         if(BUILD_SHARED_LIBS)
757                 target_compile_definitions(drawstuff PRIVATE -DDS_DLL -DUSRDLL)
758         else()
759                 target_compile_definitions(drawstuff PRIVATE -DDS_LIB)
760         endif()
761         
762         target_link_libraries(drawstuff PUBLIC ODE)
763         
764         target_include_directories(drawstuff PRIVATE ${OPENGL_INCLUDE_DIRS})
765         target_link_libraries(drawstuff PRIVATE ${OPENGL_LIBRARIES})
766         
767         if(WIN32)
768                 target_link_libraries(drawstuff PRIVATE winmm)
769         elseif(APPLE)
770                 find_package(GLUT REQUIRED)
771                 target_include_directories(drawstuff PRIVATE ${GLUT_INCLUDE_DIR})
772                 target_link_libraries(drawstuff PRIVATE ${GLUT_LIBRARIES})
773         else()
774                 find_package(X11 REQUIRED)
775                 target_include_directories(drawstuff PRIVATE ${X11_INCLUDE_DIR})
776                 target_link_libraries(drawstuff PRIVATE ${X11_LIBRARIES})
777         endif()
778         
779         set(
780                 ALL_DEMO_SRCS
781                 ode/demo/demo_boxstack.cpp
782                 ode/demo/demo_buggy.cpp
783                 ode/demo/demo_cards.cpp
784                 ode/demo/demo_chain1.c
785                 ode/demo/demo_chain2.cpp
786                 ode/demo/demo_collision.cpp
787                 ode/demo/demo_convex.cpp
788                 ode/demo/demo_crash.cpp
789                 ode/demo/demo_cylvssphere.cpp
790                 ode/demo/demo_dball.cpp
791                 ode/demo/demo_dhinge.cpp
792                 ode/demo/demo_feedback.cpp
793                 ode/demo/demo_friction.cpp
794                 ode/demo/demo_gyro2.cpp
795                 ode/demo/demo_gyroscopic.cpp
796                 ode/demo/demo_heightfield.cpp
797                 ode/demo/demo_hinge.cpp
798                 ode/demo/demo_I.cpp
799                 ode/demo/demo_jointPR.cpp
800                 ode/demo/demo_jointPU.cpp
801                 ode/demo/demo_joints.cpp
802                 ode/demo/demo_kinematic.cpp
803                 ode/demo/demo_motion.cpp
804                 ode/demo/demo_motor.cpp
805                 ode/demo/demo_ode.cpp
806                 ode/demo/demo_piston.cpp
807                 ode/demo/demo_plane2d.cpp
808                 ode/demo/demo_rfriction.cpp
809                 ode/demo/demo_slider.cpp
810                 ode/demo/demo_space.cpp
811                 ode/demo/demo_space_stress.cpp
812                 ode/demo/demo_step.cpp
813                 ode/demo/demo_transmission.cpp
814         )
815         
816         if(NOT ODE_NO_TRIMESH)
817                 list(
818                         APPEND ALL_DEMO_SRCS
819                         ode/demo/demo_basket.cpp
820                         ode/demo/demo_cyl.cpp
821                         ode/demo/demo_moving_convex.cpp
822                         ode/demo/demo_moving_trimesh.cpp
823                         ode/demo/demo_tracks.cpp
824                         ode/demo/demo_trimesh.cpp
825                 )
826         endif()
827         
828         foreach(MAIN_DEMO_SRC ${ALL_DEMO_SRCS})
829                 get_filename_component(DEMO ${MAIN_DEMO_SRC} NAME_WE)
830                 set(
831                         DEMO_SRC
832                         ${MAIN_DEMO_SRC}
833                 )
835                 if(NOT WIN32 OR ${DEMO} STREQUAL "demo_ode")
836                         add_executable(${DEMO} ${DEMO_SRC})
837                 else()
838                         if(NOT BUILD_SHARED_LIBS)
839                                 list(
840                                         APPEND DEMO_SRC 
841                                         ${DRAWSTUFF_RSRC}
842                                 )
843                         endif()
845                         add_executable(${DEMO} WIN32 ${DEMO_SRC})
846                         if(WIN32 AND MSVC)
847                                 set_target_properties(${DEMO} PROPERTIES LINK_FLAGS /ENTRY:mainCRTStartup)
848                         endif()
849                 endif()
850                 target_link_libraries(${DEMO} drawstuff)
851                 
852                 if(NOT WIN32 AND ${DEMO} STREQUAL "demo_chain1")
853                         target_link_libraries(${DEMO} m)
854                 endif()
855         endforeach()
856 endif()
858 if(ODE_WITH_TESTS)
859         set(
860                 TEST_SRCS
861                 tests/collision.cpp
862                 tests/collision_point_depth.cpp
863                 tests/friction.cpp
864                 tests/joint.cpp
865                 tests/main.cpp
866                 tests/odemath.cpp
867                 tests/joints/amotor.cpp
868                 tests/joints/ball.cpp
869                 tests/joints/dball.cpp
870                 tests/joints/fixed.cpp
871                 tests/joints/hinge.cpp
872                 tests/joints/hinge2.cpp
873                 tests/joints/piston.cpp
874                 tests/joints/pr.cpp
875                 tests/joints/pu.cpp
876                 tests/joints/slider.cpp
877                 tests/joints/universal.cpp
878                 tests/UnitTest++/src/AssertException.cpp
879                 tests/UnitTest++/src/AssertException.h
880                 tests/UnitTest++/src/CheckMacros.h
881                 tests/UnitTest++/src/Checks.cpp
882                 tests/UnitTest++/src/Checks.h
883                 tests/UnitTest++/src/Config.h
884                 tests/UnitTest++/src/DeferredTestReporter.cpp
885                 tests/UnitTest++/src/DeferredTestReporter.h
886                 tests/UnitTest++/src/DeferredTestResult.cpp
887                 tests/UnitTest++/src/DeferredTestResult.h
888                 tests/UnitTest++/src/MemoryOutStream.cpp
889                 tests/UnitTest++/src/MemoryOutStream.h
890                 tests/UnitTest++/src/ReportAssert.cpp
891                 tests/UnitTest++/src/ReportAssert.h
892                 tests/UnitTest++/src/Test.cpp
893                 tests/UnitTest++/src/TestDetails.cpp
894                 tests/UnitTest++/src/TestDetails.h
895                 tests/UnitTest++/src/Test.h
896                 tests/UnitTest++/src/TestList.cpp
897                 tests/UnitTest++/src/TestList.h
898                 tests/UnitTest++/src/TestMacros.h
899                 tests/UnitTest++/src/TestReporter.cpp
900                 tests/UnitTest++/src/TestReporter.h
901                 tests/UnitTest++/src/TestReporterStdout.cpp
902                 tests/UnitTest++/src/TestReporterStdout.h
903                 tests/UnitTest++/src/TestResults.cpp
904                 tests/UnitTest++/src/TestResults.h
905                 tests/UnitTest++/src/TestRunner.cpp
906                 tests/UnitTest++/src/TestRunner.h
907                 tests/UnitTest++/src/TestSuite.h
908                 tests/UnitTest++/src/TimeConstraint.cpp
909                 tests/UnitTest++/src/TimeConstraint.h
910                 tests/UnitTest++/src/TimeHelpers.h
911                 tests/UnitTest++/src/UnitTest++.h
912                 tests/UnitTest++/src/XmlTestReporter.cpp
913                 tests/UnitTest++/src/XmlTestReporter.h
914         )
915         
916         if(WIN32)
917                 list(
918                         APPEND TEST_SRCS
919                         tests/UnitTest++/src/Win32/TimeHelpers.cpp
920                         tests/UnitTest++/src/Win32/TimeHelpers.h
921                 )
922         else()
923                 list(
924                         APPEND TEST_SRCS
925                         tests/UnitTest++/src/Posix/SignalTranslator.cpp
926                         tests/UnitTest++/src/Posix/SignalTranslator.h
927                         tests/UnitTest++/src/Posix/TimeHelpers.cpp
928                         tests/UnitTest++/src/Posix/TimeHelpers.h
929                 )
930         endif()
931         
932         add_executable(tests ${TEST_SRCS})
933         target_include_directories(tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/tests/UnitTest++/src)
934         target_link_libraries(tests ODE)
935         
936         enable_testing()
937         add_test(tests ${CMAKE_CURRENT_BINARY_DIR}/tests)
938 endif()
940 include(CMakePackageConfigHelpers)
942 configure_package_config_file(
943   ${CMAKE_CURRENT_SOURCE_DIR}/ode-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/ode-config.cmake
944   INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ode
946 install(
947         FILES ${CMAKE_CURRENT_BINARY_DIR}/ode-config.cmake
948         DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ode-${VERSION}
949         COMPONENT development
951 write_basic_package_version_file(
952         ${CMAKE_CURRENT_BINARY_DIR}/ode-config-version.cmake
953         VERSION ${VERSION}
954         COMPATIBILITY ExactVersion
956 install(
957         FILES ${CMAKE_CURRENT_BINARY_DIR}/ode-config-version.cmake
958         DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ode-${VERSION}
959         COMPONENT development
961 install(
962         EXPORT ODE
963         DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ode-${VERSION}
964         NAMESPACE ODE::
965         FILE ode-export.cmake
966         COMPONENT development
969 configure_file(cmake/cmake_uninstall.cmake.in cmake_uninstall.cmake @ONLY)
970 add_custom_target(uninstall ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
972 set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "ODE is a free, industrial quality library for simulating articulated rigid body dynamics - for example ground vehicles, legged creatures, and moving objects in VR environments. It is fast, flexible, robust and platform independent, with advanced joints, contact with friction, and built-in collision detection.")
974 set(CPACK_COMPONENT_DEVELOPMENT_DEPENDS runtime)
975 set(CPACK_COMPONENT_DEVELOPMENT_DESCRIPTION "Open Dynamics Engine - development files\n${CPACK_DEBIAN_PACKAGE_DESCRIPTION}")
976 set(CPACK_COMPONENT_RUNTIME_DESCRIPTION "Open Dynamics Engine - runtime library\n${CPACK_DEBIAN_PACKAGE_DESCRIPTION}")
977 set(CPACK_DEB_COMPONENT_INSTALL ON)
978 set(CPACK_DEBIAN_DEVELOPMENT_FILE_NAME "DEB-DEFAULT")
979 set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_SECTION "libdevel")
980 set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.ode.org/")
981 set(CPACK_DEBIAN_PACKAGE_NAME "libode")
982 set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
983 set(CPACK_DEBIAN_RUNTIME_FILE_NAME "DEB-DEFAULT")
984 set(CPACK_DEBIAN_RUNTIME_PACKAGE_SECTION "libs")
985 set(CPACK_DEBIAN_RUNTIME_PACKAGE_SHLIBDEPS ON)
986 set(CPACK_NSIS_PACKAGE_NAME "ODE ${VERSION}")
987 set(CPACK_NSIS_URL_INFO_ABOUT "http://www.ode.org/")
988 set(CPACK_PACKAGE_CONTACT "ode@ode.org")
989 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "High performance library for simulating rigid body dynamics")
990 set(CPACK_PACKAGE_DISPLAY_NAME "ODE ${VERSION}")
991 set(CPACK_PACKAGE_INSTALL_DIRECTORY "ode-${VERSION}")
992 set(CPACK_PACKAGE_NAME "ode")
993 set(CPACK_PACKAGE_VENDOR "")
994 set(CPACK_PACKAGE_VERSION ${VERSION})
995 set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
996 set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
997 set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
998 set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/COPYING)
999 set(CPACK_RPM_COMPONENT_INSTALL ON)
1000 set(CPACK_RPM_DEVELOPMENT_FILE_NAME "RPM-DEFAULT")
1001 set(CPACK_RPM_development_PACKAGE_DESCRIPTION "The ode-devel package contains libraries and header files for developing applications that use ode or ode-double.")
1002 set(CPACK_RPM_development_PACKAGE_NAME "ode-devel")
1003 set(CPACK_RPM_development_PACKAGE_SUMMARY "Development files for ODE")
1004 set(CPACK_RPM_PACKAGE_DESCRIPTION "ODE is an open source, high performance library for simulating rigid body dynamics. It is fully featured, stable, mature and platform independent with an easy to use C/C++ API. It has advanced joint types and integrated collision detection with friction. ODE is useful for simulating vehicles, objects in virtual reality environments and virtual creatures. It is currently used in many computer games, 3D authoring tools and simulation tools.")
1005 set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
1006 set(CPACK_RPM_PACKAGE_LICENSE "BSD or LGPLv2+")
1007 set(CPACK_RPM_PACKAGE_NAME "ode")
1008 set(CPACK_RPM_PACKAGE_SUMMARY "High performance library for simulating rigid body dynamics")
1009 set(CPACK_RPM_PACKAGE_URL "http://www.ode.org/")
1010 set(CPACK_RPM_RUNTIME_FILE_NAME "RPM-DEFAULT")
1012 if(ODE_DOUBLE_PRECISION)
1013         set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_CONFLICTS "libode-sp-dev")
1014         set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libode6")
1015         set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_NAME "libode-dev")
1016         set(CPACK_DEBIAN_RUNTIME_PACKAGE_CONFLICTS "libode6sp")
1017         set(CPACK_DEBIAN_RUNTIME_PACKAGE_NAME "libode6")
1018         set(CPACK_RPM_development_PACKAGE_REQUIRES "ode-double")
1019         set(CPACK_RPM_runtime_PACKAGE_CONFLICTS "ode")
1020         set(CPACK_RPM_runtime_PACKAGE_DESCRIPTION "The ode-double package contains a version of the ODE library for simulating rigid body dynamics compiled with double precision.")
1021         set(CPACK_RPM_runtime_PACKAGE_NAME "ode-double")
1022         set(CPACK_RPM_runtime_PACKAGE_SUMMARY "ODE physics library compiled with double precision")
1023 else()
1024         set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_CONFLICTS "libode-dev")
1025         set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libode6sp")
1026         set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_NAME "libode-sp-dev")
1027         set(CPACK_DEBIAN_RUNTIME_PACKAGE_CONFLICTS "libode6")
1028         set(CPACK_DEBIAN_RUNTIME_PACKAGE_NAME "libode6sp")
1029         set(CPACK_RPM_development_PACKAGE_REQUIRES "ode")
1030         set(CPACK_RPM_runtime_PACKAGE_CONFLICTS "ode-double")
1031         set(CPACK_RPM_runtime_PACKAGE_NAME "ode")
1032 endif()
1034 include(CPack)