Imported Upstream version 2.81
[platform/upstream/libbullet.git] / Demos / AllBulletDemos / CMakeLists.txt
1 # This is basically the overall name of the project in Visual Studio this is the name of the Solution File
2
3
4 # For every executable you have with a main method you should have an add_executable line below.
5 # For every add executable line you should list every .cpp and .h file you have associated with that executable.  
6
7
8 # You shouldn't have to modify anything below this line 
9 ########################################################
10
11
12
13 INCLUDE_DIRECTORIES(
14 ${BULLET_PHYSICS_SOURCE_DIR}/Extras  
15 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/GIMPACTUtils  
16 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/HACD
17 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/ConvexDecomposition  
18 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/LibXML 
19 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/LibXML/include 
20 ${BULLET_PHYSICS_SOURCE_DIR}/src 
21 ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL 
22 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
23 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletWorldImporter
24 ${VECTOR_MATH_INCLUDE}
25 )
26
27 LINK_LIBRARIES(
28 GLUI  GIMPACTUtils HACD ConvexDecomposition  OpenGLSupport  BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletFileLoader LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
29 )
30
31 SET(AllBulletDemos_SRCS
32         Main.cpp
33         DemoEntries.cpp
34          ../CcdPhysicsDemo/CcdPhysicsDemo.cpp
35    ../BasicDemo/BasicDemo.cpp
36         ../BspDemo/BspDemo.cpp
37   ../BspDemo/BspConverter.cpp
38   ../BspDemo/BspLoader.cpp
39   ../DynamicControlDemo/MotorDemo.cpp
40   ../ConcaveDemo/ConcavePhysicsDemo.cpp
41   ../ConcaveRaycastDemo/ConcaveRaycastDemo.cpp
42   ../ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp
43   ../ConvexDecompositionDemo/ConvexDecompositionDemo.cpp
44   ../SliderConstraintDemo/SliderConstraintDemo.cpp
45   ../RagdollDemo/RagdollDemo.cpp
46   ../GimpactTestDemo/GimpactTestDemo.cpp
47   ../Raytracer/Raytracer.cpp
48   ../GjkConvexCastDemo/LinearConvexCastDemo.cpp
49   ../ForkLiftDemo/ForkLiftDemo.cpp
50   ../SoftDemo/SoftDemo.cpp
51   ../ConstraintDemo/ConstraintDemo.cpp
52   ../Benchmarks/BenchmarkDemo.cpp
53   ../Box2dDemo/Box2dDemo.cpp
54   
55 )
56
57 IF (WIN32)
58         ADD_EXECUTABLE(AppAllBulletDemos
59                 ${AllBulletDemos_SRCS}
60                 ${BULLET_PHYSICS_SOURCE_DIR}/build/bullet.rc
61         )
62 ELSE()
63         ADD_EXECUTABLE(AppAllBulletDemos
64                 ${AllBulletDemos_SRCS}
65         )
66 ENDIF()
67
68
69 IF (WIN32)
70         IF (NOT INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES)
71                 IF (CMAKE_CL_64)
72                         ADD_CUSTOM_COMMAND(
73                                 TARGET AppAllBulletDemos
74                                 POST_BUILD
75                                 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/glut64.dll ${CMAKE_CURRENT_BINARY_DIR}
76                         )
77                 ELSE(CMAKE_CL_64)
78                         ADD_CUSTOM_COMMAND(
79                                 TARGET AppAllBulletDemos
80                                 POST_BUILD
81                                 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/GLUT32.DLL ${CMAKE_CURRENT_BINARY_DIR}
82                         )
83                 ENDIF(CMAKE_CL_64)
84         ENDIF (NOT INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES)
85 ENDIF(WIN32)
86
87
88 IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
89         ADD_CUSTOM_COMMAND(
90         TARGET AppAllBulletDemos
91         POST_BUILD
92         COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/SerializeDemo/testFile.bullet  ${CMAKE_CURRENT_BINARY_DIR}/testFile.bullet
93         COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/file.obj ${CMAKE_CURRENT_BINARY_DIR}
94         )
95 ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
96
97
98
99
100 IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
101         SET_TARGET_PROPERTIES(AppAllBulletDemos PROPERTIES  DEBUG_POSTFIX "_Debug")
102         SET_TARGET_PROPERTIES(AppAllBulletDemos PROPERTIES  MINSIZEREL_POSTFIX "_MinsizeRel")
103         SET_TARGET_PROPERTIES(AppAllBulletDemos PROPERTIES  RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
104 ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)