Imported Upstream version 2.81
[platform/upstream/libbullet.git] / Demos / GenericJointDemo / 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
9 # You shouldn't have to modify anything below this line 
10 ########################################################
11
12 IF (USE_GLUT)
13
14         INCLUDE_DIRECTORIES(
15         ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL 
16         )
17
18         LINK_LIBRARIES(
19         OpenGLSupport BulletDynamics  BulletCollision LinearMath    ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
20         )
21
22         IF (WIN32)
23                 ADD_EXECUTABLE(AppGenericJointDemo
24                         GenericJointDemo.cpp
25                         GenericJointDemo.h
26                         Ragdoll.cpp
27                         main.cpp
28                         ${BULLET_PHYSICS_SOURCE_DIR}/build/bullet.rc
29                 )
30         ELSE()
31                 ADD_EXECUTABLE(AppGenericJointDemo
32                         GenericJointDemo.cpp
33                         GenericJointDemo.h
34                         Ragdoll.cpp
35                         main.cpp
36                 )
37         ENDIF()
38         IF (WIN32)
39                 IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
40                         IF (CMAKE_CL_64)
41                                 ADD_CUSTOM_COMMAND(
42                                         TARGET AppGenericJointDemo
43                                         POST_BUILD
44                                         COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/glut64.dll ${CMAKE_CURRENT_BINARY_DIR}
45                                 )
46                         ELSE(CMAKE_CL_64)
47                                 ADD_CUSTOM_COMMAND(
48                                         TARGET AppGenericJointDemo
49                                         POST_BUILD
50                                         COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/GLUT32.DLL ${CMAKE_CURRENT_BINARY_DIR}
51                                 )
52                         ENDIF(CMAKE_CL_64)
53                 ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
54         ENDIF(WIN32)
55
56 ELSE(USE_GLUT)
57
58         INCLUDE_DIRECTORIES(
59         ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL 
60         )
61
62         LINK_LIBRARIES(
63         OpenGLSupport BulletDynamics  BulletCollision LinearMath  ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
64         )
65
66         ADD_EXECUTABLE(AppGenericJointDemo
67         WIN32
68                 ../OpenGL/Win32AppMain.cpp
69                 Win32GenericJointDemo.cpp
70                 GenericJointDemo.cpp
71                 GenericJointDemo.h
72                 Ragdoll.cpp
73                 ${BULLET_PHYSICS_SOURCE_DIR}/build/bullet.rc
74                 
75         )
76 ENDIF (USE_GLUT)
77
78 IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)\r
79                         SET_TARGET_PROPERTIES(AppGenericJointDemo PROPERTIES  DEBUG_POSTFIX "_Debug")\r
80                         SET_TARGET_PROPERTIES(AppGenericJointDemo PROPERTIES  MINSIZEREL_POSTFIX "_MinsizeRel")\r
81                         SET_TARGET_PROPERTIES(AppGenericJointDemo PROPERTIES  RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")\r
82 ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)