Imported Upstream version 2.81
[platform/upstream/libbullet.git] / Demos / ConstraintDemo / 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
13
14 INCLUDE_DIRECTORIES(
15 ${BULLET_PHYSICS_SOURCE_DIR}/src 
16 ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL 
17 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
18 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletWorldImporter
19 )
20
21
22 IF (USE_GLUT)
23         LINK_LIBRARIES(
24                 OpenGLSupport BulletWorldImporter BulletDynamics  BulletCollision LinearMath  BulletFileLoader  ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
25         )
26
27         ADD_EXECUTABLE(AppConstraintDemo
28                         ConstraintDemo.cpp
29                         ConstraintDemo.h
30                         main.cpp
31         )
32         IF (WIN32)
33                 IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
34                         IF (CMAKE_CL_64)
35                                 ADD_CUSTOM_COMMAND(
36                                         TARGET AppConstraintDemo
37                                         POST_BUILD
38                                         COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/glut64.dll ${CMAKE_CURRENT_BINARY_DIR}
39                                         COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/glut64.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug
40                                 )
41                         ELSE(CMAKE_CL_64)
42                                 ADD_CUSTOM_COMMAND(
43                                         TARGET AppConstraintDemo
44                                         POST_BUILD
45                                         COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/GLUT32.DLL ${CMAKE_CURRENT_BINARY_DIR}
46                                         COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/GLUT32.DLL ${CMAKE_CURRENT_BINARY_DIR}/Debug
47                                 )
48                         ENDIF(CMAKE_CL_64)
49                 ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
50         ENDIF(WIN32)
51 ELSE (USE_GLUT)
52         LINK_LIBRARIES(
53                 OpenGLSupport BulletWorldImporter BulletDynamics  BulletCollision LinearMath BulletFileLoader ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
54         )
55
56         ADD_EXECUTABLE(AppConstraintDemo
57                 WIN32
58                 ../OpenGL/Win32AppMain.cpp
59                 Win32ConstraintDemo.cpp
60                 ConstraintDemo.cpp
61                 ConstraintDemo.h
62         )
63 ENDIF (USE_GLUT)
64
65
66
67 IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
68                         SET_TARGET_PROPERTIES(AppConstraintDemo PROPERTIES  DEBUG_POSTFIX "_Debug")
69                         SET_TARGET_PROPERTIES(AppConstraintDemo PROPERTIES  MINSIZEREL_POSTFIX "_MinsizeRel")
70                         SET_TARGET_PROPERTIES(AppConstraintDemo PROPERTIES  RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
71 ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)