CMakeLists.txt 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. INCLUDE_DIRECTORIES(
  2. ${BULLET_PHYSICS_SOURCE_DIR}/src
  3. ${BULLET_PHYSICS_SOURCE_DIR}/examples
  4. ${BULLET_PHYSICS_SOURCE_DIR}/examples/SharedMemory
  5. ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
  6. ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include
  7. ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src
  8. )
  9. SET(BulletRoboticsGUI_INCLUDES
  10. ../../examples/CommonInterfaces/Common2dCanvasInterface.h
  11. ../../examples/CommonInterfaces/CommonCallbacks.h
  12. ../../examples/CommonInterfaces/CommonCameraInterface.h
  13. ../../examples/CommonInterfaces/CommonExampleInterface.h
  14. ../../examples/CommonInterfaces/CommonFileIOInterface.h
  15. ../../examples/CommonInterfaces/CommonGraphicsAppInterface.h
  16. ../../examples/CommonInterfaces/CommonGUIHelperInterface.h
  17. ../../examples/CommonInterfaces/CommonMultiBodyBase.h
  18. ../../examples/CommonInterfaces/CommonParameterInterface.h
  19. ../../examples/CommonInterfaces/CommonRenderInterface.h
  20. ../../examples/CommonInterfaces/CommonRigidBodyBase.h
  21. ../../examples/CommonInterfaces/CommonWindowInterface.h
  22. ../../examples/OpenGLWindow/SimpleCamera.h
  23. ../../examples/TinyRenderer/geometry.h
  24. ../../examples/TinyRenderer/model.h
  25. ../../examples/TinyRenderer/tgaimage.h
  26. ../../examples/TinyRenderer/our_gl.h
  27. ../../examples/TinyRenderer/TinyRenderer.h
  28. ../../examples/SharedMemory/plugins/collisionFilterPlugin/collisionFilterPlugin.h
  29. ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.h
  30. ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoGUI.h
  31. ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h
  32. ../../examples/SharedMemory/IKTrajectoryHelper.h
  33. ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h
  34. ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h
  35. ../../examples/SharedMemory/InProcessMemory.h
  36. ../../examples/SharedMemory/PhysicsServer.h
  37. ../../examples/SharedMemory/PhysicsClient.h
  38. ../../examples/SharedMemory/PhysicsServerSharedMemory.h
  39. ../../examples/SharedMemory/PhysicsDirect.h
  40. ../../examples/SharedMemory/PhysicsDirectC_API.h
  41. ../../examples/SharedMemory/PhysicsServerCommandProcessor.h
  42. ../../examples/SharedMemory/b3PluginManager.h
  43. ../../examples/SharedMemory/PhysicsClientSharedMemory.h
  44. ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h
  45. ../../examples/SharedMemory/PhysicsClientC_API.h
  46. ../../examples/SharedMemory/SharedMemoryPublic.h
  47. ../../examples/SharedMemory/Win32SharedMemory.h
  48. ../../examples/SharedMemory/PosixSharedMemory.h
  49. ../../examples/Utils/b3ResourcePath.h
  50. ../../examples/Utils/RobotLoggingUtil.h
  51. ../../examples/Utils/b3Clock.h
  52. ../../examples/Utils/b3ResourcePath.h
  53. ../../examples/Utils/ChromeTraceUtil.h
  54. ../../examples/Utils/b3ERPCFMHelper.hpp
  55. ../../examples/Utils/b3ReferenceFrameHelper.hpp
  56. ../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.h
  57. ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h
  58. ../../examples/ThirdPartyLibs/stb_image/stb_image.h
  59. ../../examples/ThirdPartyLibs/BussIK/Jacobian.h
  60. ../../examples/ThirdPartyLibs/BussIK/LinearR2.h
  61. ../../examples/ThirdPartyLibs/BussIK/LinearR3.h
  62. ../../examples/ThirdPartyLibs/BussIK/LinearR4.h
  63. ../../examples/ThirdPartyLibs/BussIK/MatrixRmn.h
  64. ../../examples/ThirdPartyLibs/BussIK/Node.h
  65. ../../examples/ThirdPartyLibs/BussIK/Tree.h
  66. ../../examples/ThirdPartyLibs/BussIK/VectorRn.h
  67. ../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.h
  68. ../../examples/Importers/ImportObjDemo/LoadMeshFromObj.h
  69. ../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.h
  70. ../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.h
  71. ../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.h
  72. ../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.h
  73. ../../examples/Importers/ImportURDFDemo/URDF2Bullet.h
  74. ../../examples/Importers/ImportURDFDemo/UrdfParser.h
  75. ../../examples/Importers/ImportURDFDemo/urdfStringSplit.h
  76. ../../examples/Importers/ImportURDFDemo/URDFImporterInterface.h
  77. ../../examples/Importers/ImportURDFDemo/URDFJointTypes.h
  78. ../../examples/Importers/ImportURDFDemo/SDFAudioTypes.h
  79. ../../examples/Importers/ImportURDFDemo/UrdfRenderingInterface.h
  80. ../../examples/Importers/ImportURDFDemo/MultiBodyCreationInterface.h
  81. ../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.h
  82. ../../examples/MultiThreading/b3PosixThreadSupport.h
  83. ../../examples/MultiThreading/b3Win32ThreadSupport.h
  84. ../../examples/MultiThreading/b3ThreadSupportInterface.h
  85. )
  86. SET(BulletRoboticsGUI_SRCS ${BulletRoboticsGUI_INCLUDES}
  87. ../../examples/ExampleBrowser/InProcessExampleBrowser.cpp
  88. ../../examples/SharedMemory/GraphicsServerExample.cpp
  89. ../../examples/SharedMemory/GraphicsClientExample.cpp
  90. ../../examples/SharedMemory/RemoteGUIHelper.cpp
  91. ../../examples/SharedMemory/RemoteGUIHelperTCP.cpp
  92. ../../examples/SharedMemory/GraphicsServerExample.h
  93. ../../examples/SharedMemory/GraphicsClientExample.h
  94. ../../examples/SharedMemory/RemoteGUIHelper.h
  95. ../../examples/SharedMemory/GraphicsSharedMemoryCommands.h
  96. ../../examples/SharedMemory/GraphicsSharedMemoryPublic.h
  97. ../../examples/SharedMemory/PhysicsServerExample.cpp
  98. ../../examples/SharedMemory/PhysicsServerExampleBullet2.cpp
  99. ../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp
  100. )
  101. IF(BUILD_CLSOCKET)
  102. ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET)
  103. ENDIF(BUILD_CLSOCKET)
  104. IF(WIN32)
  105. IF(BUILD_ENET)
  106. ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET)
  107. ENDIF(BUILD_ENET)
  108. IF(BUILD_CLSOCKET)
  109. ADD_DEFINITIONS(-DWIN32)
  110. ENDIF(BUILD_CLSOCKET)
  111. ELSE(WIN32)
  112. IF(BUILD_ENET)
  113. ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET)
  114. ENDIF(BUILD_ENET)
  115. IF(BUILD_CLSOCKET)
  116. ADD_DEFINITIONS(${OSDEF})
  117. ENDIF(BUILD_CLSOCKET)
  118. IF(NOT APPLE)
  119. FIND_PACKAGE(Threads)
  120. LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
  121. ENDIF(NOT APPLE)
  122. ENDIF(WIN32)
  123. IF(BUILD_ENET)
  124. set(BulletRoboticsGUI_ENET_INCLUDES
  125. ../../examples/SharedMemory/PhysicsClientUDP.h
  126. ../../examples/SharedMemory/PhysicsClientUDP_C_API.h
  127. ../../examples/ThirdPartyLibs/enet/include/enet/win32.h
  128. ../../examples/ThirdPartyLibs/enet/include/enet/unix.h
  129. ../../examples/ThirdPartyLibs/enet/include/enet/callbacks.h
  130. ../../examples/ThirdPartyLibs/enet/include/enet/list.h
  131. ../../examples/ThirdPartyLibs/enet/include/enet/protocol.h
  132. )
  133. set(BulletRoboticsGUI_INCLUDES
  134. ${BulletRoboticsGUI_INCLUDES}
  135. ${BulletRoboticsGUI_ENET_INCLUDES}
  136. )
  137. ENDIF(BUILD_ENET)
  138. ADD_DEFINITIONS(-DPHYSICS_SERVER_DIRECT)
  139. ADD_LIBRARY(BulletRoboticsGUI ${BulletRoboticsGUI_SRCS})
  140. SET_TARGET_PROPERTIES(BulletRoboticsGUI PROPERTIES VERSION ${BULLET_VERSION})
  141. SET_TARGET_PROPERTIES(BulletRoboticsGUI PROPERTIES SOVERSION ${BULLET_VERSION})
  142. IF (BUILD_SHARED_LIBS)
  143. TARGET_LINK_LIBRARIES(BulletRoboticsGUI BulletExampleBrowserLib BulletRobotics BulletInverseDynamicsUtils BulletWorldImporter BulletFileLoader BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamics LinearMath Bullet3Common)
  144. ENDIF (BUILD_SHARED_LIBS)
  145. INSTALL(TARGETS
  146. BulletRoboticsGUI
  147. LIBRARY DESTINATION lib${LIB_SUFFIX}
  148. ARCHIVE DESTINATION lib${LIB_SUFFIX}
  149. )
  150. IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
  151. SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES FRAMEWORK true)
  152. SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES PUBLIC_HEADER "PhysicsClientC_API.h" )
  153. ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
  154. IF(NOT MSVC)
  155. SET(PKGCONFIG_INSTALL_PREFIX "lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files")
  156. CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bullet_robotics_gui.pc.cmake
  157. ${CMAKE_CURRENT_BINARY_DIR}/bullet_robotics_gui.pc @ONLY)
  158. INSTALL(
  159. FILES
  160. ${CMAKE_CURRENT_BINARY_DIR}/bullet_robotics_gui.pc
  161. DESTINATION
  162. ${PKGCONFIG_INSTALL_PREFIX}
  163. )
  164. ENDIF(NOT MSVC)