From 9009ca914ec1412f7acdc87546bcc004bec5f7dc Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Mon, 29 Apr 2019 11:03:41 -0400 Subject: Run cmake-format cmake-format --command-case upper --dangle-parens true CMakeLists.txt --- examples/pybullet/CMakeLists.txt | 329 ++++++++++++++++++++------------------- 1 file changed, 171 insertions(+), 158 deletions(-) diff --git a/examples/pybullet/CMakeLists.txt b/examples/pybullet/CMakeLists.txt index 1b791ec7e..a48c1828d 100644 --- a/examples/pybullet/CMakeLists.txt +++ b/examples/pybullet/CMakeLists.txt @@ -1,164 +1,159 @@ - -INCLUDE_DIRECTORIES( - ${BULLET_PHYSICS_SOURCE_DIR}/src - ${BULLET_PHYSICS_SOURCE_DIR}/examples - ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs - ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include - ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src - ${PYTHON_INCLUDE_DIRS} - ) +INCLUDE_DIRECTORIES( + ${BULLET_PHYSICS_SOURCE_DIR}/src + ${BULLET_PHYSICS_SOURCE_DIR}/examples + ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs + ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include + ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src + ${PYTHON_INCLUDE_DIRS} +) IF(BUILD_PYBULLET_NUMPY) - INCLUDE_DIRECTORIES( - ${PYTHON_NUMPY_INCLUDE_DIR} - ) + INCLUDE_DIRECTORIES(${PYTHON_NUMPY_INCLUDE_DIR}) ENDIF() ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN) -SET(pybullet_SRCS - pybullet.c - ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.h - ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.h - ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.h - ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.h - ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.h - ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.h - ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.h - ../../examples/SharedMemory/plugins/collisionFilterPlugin/collisionFilterPlugin.cpp - ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.cpp - ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.h - ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp - ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h - ../../examples/SharedMemory/IKTrajectoryHelper.cpp - ../../examples/SharedMemory/IKTrajectoryHelper.h - ../../examples/ExampleBrowser/InProcessExampleBrowser.cpp - ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.cpp - ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h - ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp - ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h - ../../examples/OpenGLWindow/SimpleCamera.cpp - ../../examples/OpenGLWindow/SimpleCamera.h - ../../examples/TinyRenderer/geometry.cpp - ../../examples/TinyRenderer/model.cpp - ../../examples/TinyRenderer/tgaimage.cpp - ../../examples/TinyRenderer/our_gl.cpp - ../../examples/TinyRenderer/TinyRenderer.cpp - ../../examples/SharedMemory/InProcessMemory.cpp - ../../examples/SharedMemory/PhysicsClient.cpp - ../../examples/SharedMemory/PhysicsClient.h - ../../examples/SharedMemory/PhysicsServer.cpp - ../../examples/SharedMemory/PhysicsServer.h - ../../examples/SharedMemory/PhysicsServerExample.cpp - ../../examples/SharedMemory/PhysicsServerExampleBullet2.cpp - ../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp - ../../examples/SharedMemory/PhysicsServerSharedMemory.cpp - ../../examples/SharedMemory/PhysicsServerSharedMemory.h - ../../examples/SharedMemory/PhysicsDirect.cpp - ../../examples/SharedMemory/PhysicsDirect.h - ../../examples/SharedMemory/PhysicsDirectC_API.cpp - ../../examples/SharedMemory/PhysicsDirectC_API.h - ../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp - ../../examples/SharedMemory/PhysicsServerCommandProcessor.h - ../../examples/SharedMemory/b3PluginManager.cpp - ../../examples/SharedMemory/b3PluginManager.h - - ../../examples/SharedMemory/PhysicsClientSharedMemory.cpp - ../../examples/SharedMemory/PhysicsClientSharedMemory.h - ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp - ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h - - ../../examples/SharedMemory/PhysicsClientC_API.cpp - ../../examples/SharedMemory/PhysicsClientC_API.h - ../../examples/SharedMemory/Win32SharedMemory.cpp - ../../examples/SharedMemory/Win32SharedMemory.h - ../../examples/SharedMemory/PosixSharedMemory.cpp - ../../examples/SharedMemory/PosixSharedMemory.h - ../../examples/Utils/b3ResourcePath.cpp - ../../examples/Utils/b3ResourcePath.h - ../../examples/Utils/RobotLoggingUtil.cpp - ../../examples/Utils/RobotLoggingUtil.h - - ../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp - ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp - ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h - ../../examples/ThirdPartyLibs/stb_image/stb_image.cpp - ../../examples/ThirdPartyLibs/stb_image/stb_image_write.cpp - ../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.cpp - ../../examples/Importers/ImportObjDemo/LoadMeshFromObj.cpp - ../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp - ../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp - ../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp - ../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp - ../../examples/Importers/ImportURDFDemo/URDF2Bullet.cpp - ../../examples/Importers/ImportURDFDemo/UrdfParser.cpp - ../../examples/Importers/ImportURDFDemo/urdfStringSplit.cpp - ../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp - ../../examples/MultiThreading/b3PosixThreadSupport.cpp - ../../examples/MultiThreading/b3Win32ThreadSupport.cpp - ../../examples/MultiThreading/b3ThreadSupportInterface.cpp - +SET( + pybullet_SRCS + pybullet.c + ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.h + ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.h + ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.h + ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.h + ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.h + ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.h + ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.h + ../../examples/SharedMemory/plugins/collisionFilterPlugin/collisionFilterPlugin.cpp + ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.cpp + ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.h + ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp + ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h + ../../examples/SharedMemory/IKTrajectoryHelper.cpp + ../../examples/SharedMemory/IKTrajectoryHelper.h + ../../examples/ExampleBrowser/InProcessExampleBrowser.cpp + ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.cpp + ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h + ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp + ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h + ../../examples/OpenGLWindow/SimpleCamera.cpp + ../../examples/OpenGLWindow/SimpleCamera.h + ../../examples/TinyRenderer/geometry.cpp + ../../examples/TinyRenderer/model.cpp + ../../examples/TinyRenderer/tgaimage.cpp + ../../examples/TinyRenderer/our_gl.cpp + ../../examples/TinyRenderer/TinyRenderer.cpp + ../../examples/SharedMemory/InProcessMemory.cpp + ../../examples/SharedMemory/PhysicsClient.cpp + ../../examples/SharedMemory/PhysicsClient.h + ../../examples/SharedMemory/PhysicsServer.cpp + ../../examples/SharedMemory/PhysicsServer.h + ../../examples/SharedMemory/PhysicsServerExample.cpp + ../../examples/SharedMemory/PhysicsServerExampleBullet2.cpp + ../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp + ../../examples/SharedMemory/PhysicsServerSharedMemory.cpp + ../../examples/SharedMemory/PhysicsServerSharedMemory.h + ../../examples/SharedMemory/PhysicsDirect.cpp + ../../examples/SharedMemory/PhysicsDirect.h + ../../examples/SharedMemory/PhysicsDirectC_API.cpp + ../../examples/SharedMemory/PhysicsDirectC_API.h + ../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp + ../../examples/SharedMemory/PhysicsServerCommandProcessor.h + ../../examples/SharedMemory/b3PluginManager.cpp + ../../examples/SharedMemory/b3PluginManager.h + ../../examples/SharedMemory/PhysicsClientSharedMemory.cpp + ../../examples/SharedMemory/PhysicsClientSharedMemory.h + ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp + ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h + ../../examples/SharedMemory/PhysicsClientC_API.cpp + ../../examples/SharedMemory/PhysicsClientC_API.h + ../../examples/SharedMemory/Win32SharedMemory.cpp + ../../examples/SharedMemory/Win32SharedMemory.h + ../../examples/SharedMemory/PosixSharedMemory.cpp + ../../examples/SharedMemory/PosixSharedMemory.h + ../../examples/Utils/b3ResourcePath.cpp + ../../examples/Utils/b3ResourcePath.h + ../../examples/Utils/RobotLoggingUtil.cpp + ../../examples/Utils/RobotLoggingUtil.h + ../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp + ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp + ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h + ../../examples/ThirdPartyLibs/stb_image/stb_image.cpp + ../../examples/ThirdPartyLibs/stb_image/stb_image_write.cpp + ../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.cpp + ../../examples/Importers/ImportObjDemo/LoadMeshFromObj.cpp + ../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp + ../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp + ../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp + ../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp + ../../examples/Importers/ImportURDFDemo/URDF2Bullet.cpp + ../../examples/Importers/ImportURDFDemo/UrdfParser.cpp + ../../examples/Importers/ImportURDFDemo/urdfStringSplit.cpp + ../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp + ../../examples/MultiThreading/b3PosixThreadSupport.cpp + ../../examples/MultiThreading/b3Win32ThreadSupport.cpp + ../../examples/MultiThreading/b3ThreadSupportInterface.cpp ) IF(BUILD_PYBULLET_CLSOCKET) - ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET) + ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET) ENDIF(BUILD_PYBULLET_CLSOCKET) IF(WIN32) - LINK_LIBRARIES( - ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} - ) - IF(BUILD_PYBULLET_ENET) - ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET) - ENDIF(BUILD_PYBULLET_ENET) - IF(BUILD_PYBULLET_CLSOCKET) - ADD_DEFINITIONS(-DWIN32) - ENDIF(BUILD_PYBULLET_CLSOCKET) + LINK_LIBRARIES(${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + IF(BUILD_PYBULLET_ENET) + ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET) + ENDIF(BUILD_PYBULLET_ENET) + IF(BUILD_PYBULLET_CLSOCKET) + ADD_DEFINITIONS(-DWIN32) + ENDIF(BUILD_PYBULLET_CLSOCKET) ELSE(WIN32) - IF(BUILD_PYBULLET_ENET) - ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET) - ENDIF(BUILD_PYBULLET_ENET) + IF(BUILD_PYBULLET_ENET) + ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET) + ENDIF(BUILD_PYBULLET_ENET) - IF(BUILD_PYBULLET_CLSOCKET) - ADD_DEFINITIONS(${OSDEF}) - ENDIF(BUILD_PYBULLET_CLSOCKET) + IF(BUILD_PYBULLET_CLSOCKET) + ADD_DEFINITIONS(${OSDEF}) + ENDIF(BUILD_PYBULLET_CLSOCKET) ENDIF(WIN32) - IF(BUILD_PYBULLET_ENET) - set(pybullet_SRCS ${pybullet_SRCS} - ../../examples/SharedMemory/PhysicsClientUDP.cpp - ../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp - ../../examples/SharedMemory/PhysicsClientUDP.h - ../../examples/SharedMemory/PhysicsClientUDP_C_API.h - ../../examples/ThirdPartyLibs/enet/win32.c - ../../examples/ThirdPartyLibs/enet/unix.c - ../../examples/ThirdPartyLibs/enet/callbacks.c - ../../examples/ThirdPartyLibs/enet/compress.c - ../../examples/ThirdPartyLibs/enet/host.c - ../../examples/ThirdPartyLibs/enet/list.c - ../../examples/ThirdPartyLibs/enet/packet.c - ../../examples/ThirdPartyLibs/enet/peer.c - ../../examples/ThirdPartyLibs/enet/protocol.c - ) + SET( + pybullet_SRCS + ${pybullet_SRCS} + ../../examples/SharedMemory/PhysicsClientUDP.cpp + ../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp + ../../examples/SharedMemory/PhysicsClientUDP.h + ../../examples/SharedMemory/PhysicsClientUDP_C_API.h + ../../examples/ThirdPartyLibs/enet/win32.c + ../../examples/ThirdPartyLibs/enet/unix.c + ../../examples/ThirdPartyLibs/enet/callbacks.c + ../../examples/ThirdPartyLibs/enet/compress.c + ../../examples/ThirdPartyLibs/enet/host.c + ../../examples/ThirdPartyLibs/enet/list.c + ../../examples/ThirdPartyLibs/enet/packet.c + ../../examples/ThirdPartyLibs/enet/peer.c + ../../examples/ThirdPartyLibs/enet/protocol.c + ) ENDIF(BUILD_PYBULLET_ENET) IF(BUILD_PYBULLET_CLSOCKET) - set(pybullet_SRCS ${pybullet_SRCS} - ../../examples/SharedMemory/PhysicsClientTCP.cpp - ../../examples/SharedMemory/PhysicsClientTCP.h - ../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp - ../../examples/SharedMemory/PhysicsClientTCP_C_API.h - ../../examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp - ../../examples/ThirdPartyLibs/clsocket/src/ActiveSocket.cpp - ../../examples/ThirdPartyLibs/clsocket/src/PassiveSocket.cpp - ) + SET( + pybullet_SRCS + ${pybullet_SRCS} + ../../examples/SharedMemory/PhysicsClientTCP.cpp + ../../examples/SharedMemory/PhysicsClientTCP.h + ../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp + ../../examples/SharedMemory/PhysicsClientTCP_C_API.h + ../../examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp + ../../examples/ThirdPartyLibs/clsocket/src/ActiveSocket.cpp + ../../examples/ThirdPartyLibs/clsocket/src/PassiveSocket.cpp + ) ENDIF() ADD_LIBRARY(pybullet SHARED ${pybullet_SRCS}) @@ -170,35 +165,53 @@ SET_TARGET_PROPERTIES(pybullet PROPERTIES VERSION ${BULLET_VERSION}) SET_TARGET_PROPERTIES(pybullet PROPERTIES SOVERSION ${BULLET_VERSION}) SET_TARGET_PROPERTIES(pybullet PROPERTIES DEBUG_POSTFIX "_d") - IF(WIN32) - IF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) - TARGET_LINK_LIBRARIES(pybullet ws2_32 ) - ENDIF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) + IF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) + TARGET_LINK_LIBRARIES(pybullet ws2_32) + ENDIF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) - SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".pyd" ) + SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".pyd") ENDIF(WIN32) -IF (APPLE) - SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".so" ) +IF(APPLE) + SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".so") ENDIF() +TARGET_LINK_LIBRARIES( + pybullet + BulletExampleBrowserLib + BulletFileLoader + BulletWorldImporter + BulletSoftBody + BulletDynamics + BulletCollision + BulletInverseDynamicsUtils + BulletInverseDynamics + LinearMath + OpenGLWindow + gwen + BussIK + Bullet3Common +) - -TARGET_LINK_LIBRARIES(pybullet BulletExampleBrowserLib BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen BussIK Bullet3Common) - -IF (WIN32) +IF(WIN32) TARGET_LINK_LIBRARIES(pybullet ${PYTHON_LIBRARIES}) -ELSEIF (APPLE) - SET_TARGET_PROPERTIES(pybullet PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") -ENDIF () +ELSEIF(APPLE) + SET_TARGET_PROPERTIES( + pybullet + PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" + ) +ENDIF() # else Linux: dont link IF(WIN32) SET(PYTHON_SITE_PACKAGES Lib/site-packages CACHE PATH "Python install path") ELSE() - SET(PYTHON_SITE_PACKAGES lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE PATH "Python install path") + SET( + PYTHON_SITE_PACKAGES + lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages + CACHE PATH "Python install path" + ) ENDIF() INSTALL(TARGETS pybullet DESTINATION ${PYTHON_SITE_PACKAGES}) - -- cgit v1.2.1 From 76b27cf4101cbd32eee581347d971ec197cb8c60 Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Mon, 29 Apr 2019 11:04:33 -0400 Subject: Copy from pybullet --- examples/c_api/CMakeLists.txt | 217 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 examples/c_api/CMakeLists.txt diff --git a/examples/c_api/CMakeLists.txt b/examples/c_api/CMakeLists.txt new file mode 100644 index 000000000..a48c1828d --- /dev/null +++ b/examples/c_api/CMakeLists.txt @@ -0,0 +1,217 @@ +INCLUDE_DIRECTORIES( + ${BULLET_PHYSICS_SOURCE_DIR}/src + ${BULLET_PHYSICS_SOURCE_DIR}/examples + ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs + ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include + ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src + ${PYTHON_INCLUDE_DIRS} +) +IF(BUILD_PYBULLET_NUMPY) + INCLUDE_DIRECTORIES(${PYTHON_NUMPY_INCLUDE_DIR}) +ENDIF() + +ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN) + +SET( + pybullet_SRCS + pybullet.c + ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.h + ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.h + ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.h + ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.h + ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.h + ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.h + ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.cpp + ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.h + ../../examples/SharedMemory/plugins/collisionFilterPlugin/collisionFilterPlugin.cpp + ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.cpp + ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.h + ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp + ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h + ../../examples/SharedMemory/IKTrajectoryHelper.cpp + ../../examples/SharedMemory/IKTrajectoryHelper.h + ../../examples/ExampleBrowser/InProcessExampleBrowser.cpp + ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.cpp + ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h + ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp + ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h + ../../examples/OpenGLWindow/SimpleCamera.cpp + ../../examples/OpenGLWindow/SimpleCamera.h + ../../examples/TinyRenderer/geometry.cpp + ../../examples/TinyRenderer/model.cpp + ../../examples/TinyRenderer/tgaimage.cpp + ../../examples/TinyRenderer/our_gl.cpp + ../../examples/TinyRenderer/TinyRenderer.cpp + ../../examples/SharedMemory/InProcessMemory.cpp + ../../examples/SharedMemory/PhysicsClient.cpp + ../../examples/SharedMemory/PhysicsClient.h + ../../examples/SharedMemory/PhysicsServer.cpp + ../../examples/SharedMemory/PhysicsServer.h + ../../examples/SharedMemory/PhysicsServerExample.cpp + ../../examples/SharedMemory/PhysicsServerExampleBullet2.cpp + ../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp + ../../examples/SharedMemory/PhysicsServerSharedMemory.cpp + ../../examples/SharedMemory/PhysicsServerSharedMemory.h + ../../examples/SharedMemory/PhysicsDirect.cpp + ../../examples/SharedMemory/PhysicsDirect.h + ../../examples/SharedMemory/PhysicsDirectC_API.cpp + ../../examples/SharedMemory/PhysicsDirectC_API.h + ../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp + ../../examples/SharedMemory/PhysicsServerCommandProcessor.h + ../../examples/SharedMemory/b3PluginManager.cpp + ../../examples/SharedMemory/b3PluginManager.h + ../../examples/SharedMemory/PhysicsClientSharedMemory.cpp + ../../examples/SharedMemory/PhysicsClientSharedMemory.h + ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp + ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h + ../../examples/SharedMemory/PhysicsClientC_API.cpp + ../../examples/SharedMemory/PhysicsClientC_API.h + ../../examples/SharedMemory/Win32SharedMemory.cpp + ../../examples/SharedMemory/Win32SharedMemory.h + ../../examples/SharedMemory/PosixSharedMemory.cpp + ../../examples/SharedMemory/PosixSharedMemory.h + ../../examples/Utils/b3ResourcePath.cpp + ../../examples/Utils/b3ResourcePath.h + ../../examples/Utils/RobotLoggingUtil.cpp + ../../examples/Utils/RobotLoggingUtil.h + ../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp + ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp + ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h + ../../examples/ThirdPartyLibs/stb_image/stb_image.cpp + ../../examples/ThirdPartyLibs/stb_image/stb_image_write.cpp + ../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.cpp + ../../examples/Importers/ImportObjDemo/LoadMeshFromObj.cpp + ../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp + ../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp + ../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp + ../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp + ../../examples/Importers/ImportURDFDemo/URDF2Bullet.cpp + ../../examples/Importers/ImportURDFDemo/UrdfParser.cpp + ../../examples/Importers/ImportURDFDemo/urdfStringSplit.cpp + ../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp + ../../examples/MultiThreading/b3PosixThreadSupport.cpp + ../../examples/MultiThreading/b3Win32ThreadSupport.cpp + ../../examples/MultiThreading/b3ThreadSupportInterface.cpp +) +IF(BUILD_PYBULLET_CLSOCKET) + ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET) +ENDIF(BUILD_PYBULLET_CLSOCKET) + +IF(WIN32) + LINK_LIBRARIES(${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + IF(BUILD_PYBULLET_ENET) + ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET) + ENDIF(BUILD_PYBULLET_ENET) + IF(BUILD_PYBULLET_CLSOCKET) + ADD_DEFINITIONS(-DWIN32) + ENDIF(BUILD_PYBULLET_CLSOCKET) + +ELSE(WIN32) + IF(BUILD_PYBULLET_ENET) + ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET) + ENDIF(BUILD_PYBULLET_ENET) + + IF(BUILD_PYBULLET_CLSOCKET) + ADD_DEFINITIONS(${OSDEF}) + ENDIF(BUILD_PYBULLET_CLSOCKET) +ENDIF(WIN32) + +IF(BUILD_PYBULLET_ENET) + SET( + pybullet_SRCS + ${pybullet_SRCS} + ../../examples/SharedMemory/PhysicsClientUDP.cpp + ../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp + ../../examples/SharedMemory/PhysicsClientUDP.h + ../../examples/SharedMemory/PhysicsClientUDP_C_API.h + ../../examples/ThirdPartyLibs/enet/win32.c + ../../examples/ThirdPartyLibs/enet/unix.c + ../../examples/ThirdPartyLibs/enet/callbacks.c + ../../examples/ThirdPartyLibs/enet/compress.c + ../../examples/ThirdPartyLibs/enet/host.c + ../../examples/ThirdPartyLibs/enet/list.c + ../../examples/ThirdPartyLibs/enet/packet.c + ../../examples/ThirdPartyLibs/enet/peer.c + ../../examples/ThirdPartyLibs/enet/protocol.c + ) +ENDIF(BUILD_PYBULLET_ENET) + +IF(BUILD_PYBULLET_CLSOCKET) + SET( + pybullet_SRCS + ${pybullet_SRCS} + ../../examples/SharedMemory/PhysicsClientTCP.cpp + ../../examples/SharedMemory/PhysicsClientTCP.h + ../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp + ../../examples/SharedMemory/PhysicsClientTCP_C_API.h + ../../examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp + ../../examples/ThirdPartyLibs/clsocket/src/ActiveSocket.cpp + ../../examples/ThirdPartyLibs/clsocket/src/PassiveSocket.cpp + ) +ENDIF() + +ADD_LIBRARY(pybullet SHARED ${pybullet_SRCS}) + +SET_TARGET_PROPERTIES(pybullet PROPERTIES PREFIX "") +SET_TARGET_PROPERTIES(pybullet PROPERTIES POSTFIX "") + +SET_TARGET_PROPERTIES(pybullet PROPERTIES VERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(pybullet PROPERTIES SOVERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(pybullet PROPERTIES DEBUG_POSTFIX "_d") + +IF(WIN32) + IF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) + TARGET_LINK_LIBRARIES(pybullet ws2_32) + ENDIF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) + + SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".pyd") +ENDIF(WIN32) + +IF(APPLE) + SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".so") +ENDIF() + +TARGET_LINK_LIBRARIES( + pybullet + BulletExampleBrowserLib + BulletFileLoader + BulletWorldImporter + BulletSoftBody + BulletDynamics + BulletCollision + BulletInverseDynamicsUtils + BulletInverseDynamics + LinearMath + OpenGLWindow + gwen + BussIK + Bullet3Common +) + +IF(WIN32) + TARGET_LINK_LIBRARIES(pybullet ${PYTHON_LIBRARIES}) +ELSEIF(APPLE) + SET_TARGET_PROPERTIES( + pybullet + PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" + ) +ENDIF() +# else Linux: dont link + +IF(WIN32) + SET(PYTHON_SITE_PACKAGES Lib/site-packages CACHE PATH "Python install path") +ELSE() + SET( + PYTHON_SITE_PACKAGES + lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages + CACHE PATH "Python install path" + ) +ENDIF() + +INSTALL(TARGETS pybullet DESTINATION ${PYTHON_SITE_PACKAGES}) -- cgit v1.2.1 From aff54a23973c4f2cfc467689ad8333f1bf98aab8 Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Mon, 29 Apr 2019 11:28:17 -0400 Subject: Refactor C API part of pybullet out --- examples/CMakeLists.txt | 2 +- examples/c_api/CMakeLists.txt | 61 ++++------------ examples/pybullet/CMakeLists.txt | 153 +-------------------------------------- 3 files changed, 16 insertions(+), 200 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 1918a9003..09fd3fcef 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,6 +1,6 @@ SUBDIRS( HelloWorld BasicDemo ) IF(BUILD_BULLET3) - SUBDIRS( ExampleBrowser RobotSimulator SharedMemory ThirdPartyLibs/Gwen ThirdPartyLibs/BussIK ThirdPartyLibs/clsocket OpenGLWindow TwoJoint ) + SUBDIRS( ExampleBrowser RobotSimulator SharedMemory ThirdPartyLibs/Gwen ThirdPartyLibs/BussIK ThirdPartyLibs/clsocket OpenGLWindow TwoJoint c_api) ENDIF() IF(BUILD_PYBULLET) diff --git a/examples/c_api/CMakeLists.txt b/examples/c_api/CMakeLists.txt index a48c1828d..a41983dee 100644 --- a/examples/c_api/CMakeLists.txt +++ b/examples/c_api/CMakeLists.txt @@ -4,17 +4,11 @@ INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src - ${PYTHON_INCLUDE_DIRS} ) -IF(BUILD_PYBULLET_NUMPY) - INCLUDE_DIRECTORIES(${PYTHON_NUMPY_INCLUDE_DIR}) -ENDIF() -ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN) SET( - pybullet_SRCS - pybullet.c + bullet_c_api_SRCS ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.cpp ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.h ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp @@ -124,8 +118,8 @@ ENDIF(WIN32) IF(BUILD_PYBULLET_ENET) SET( - pybullet_SRCS - ${pybullet_SRCS} + bullet_c_api_SRCS + ${bullet_c_api_SRCS} ../../examples/SharedMemory/PhysicsClientUDP.cpp ../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp ../../examples/SharedMemory/PhysicsClientUDP.h @@ -144,8 +138,8 @@ ENDIF(BUILD_PYBULLET_ENET) IF(BUILD_PYBULLET_CLSOCKET) SET( - pybullet_SRCS - ${pybullet_SRCS} + bullet_c_api_SRCS + ${bullet_c_api_SRCS} ../../examples/SharedMemory/PhysicsClientTCP.cpp ../../examples/SharedMemory/PhysicsClientTCP.h ../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp @@ -156,29 +150,24 @@ IF(BUILD_PYBULLET_CLSOCKET) ) ENDIF() -ADD_LIBRARY(pybullet SHARED ${pybullet_SRCS}) +ADD_LIBRARY(bullet_c_api SHARED ${bullet_c_api_SRCS}) -SET_TARGET_PROPERTIES(pybullet PROPERTIES PREFIX "") -SET_TARGET_PROPERTIES(pybullet PROPERTIES POSTFIX "") +SET_TARGET_PROPERTIES(bullet_c_api PROPERTIES PREFIX "") +SET_TARGET_PROPERTIES(bullet_c_api PROPERTIES POSTFIX "") -SET_TARGET_PROPERTIES(pybullet PROPERTIES VERSION ${BULLET_VERSION}) -SET_TARGET_PROPERTIES(pybullet PROPERTIES SOVERSION ${BULLET_VERSION}) -SET_TARGET_PROPERTIES(pybullet PROPERTIES DEBUG_POSTFIX "_d") +SET_TARGET_PROPERTIES(bullet_c_api PROPERTIES VERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(bullet_c_api PROPERTIES SOVERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(bullet_c_api PROPERTIES DEBUG_POSTFIX "_d") IF(WIN32) IF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) - TARGET_LINK_LIBRARIES(pybullet ws2_32) + TARGET_LINK_LIBRARIES(bullet_c_api ws2_32) ENDIF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) - - SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".pyd") ENDIF(WIN32) -IF(APPLE) - SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".so") -ENDIF() TARGET_LINK_LIBRARIES( - pybullet + bullet_c_api BulletExampleBrowserLib BulletFileLoader BulletWorldImporter @@ -192,26 +181,4 @@ TARGET_LINK_LIBRARIES( gwen BussIK Bullet3Common -) - -IF(WIN32) - TARGET_LINK_LIBRARIES(pybullet ${PYTHON_LIBRARIES}) -ELSEIF(APPLE) - SET_TARGET_PROPERTIES( - pybullet - PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" - ) -ENDIF() -# else Linux: dont link - -IF(WIN32) - SET(PYTHON_SITE_PACKAGES Lib/site-packages CACHE PATH "Python install path") -ELSE() - SET( - PYTHON_SITE_PACKAGES - lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages - CACHE PATH "Python install path" - ) -ENDIF() - -INSTALL(TARGETS pybullet DESTINATION ${PYTHON_SITE_PACKAGES}) +) \ No newline at end of file diff --git a/examples/pybullet/CMakeLists.txt b/examples/pybullet/CMakeLists.txt index a48c1828d..7b59d887a 100644 --- a/examples/pybullet/CMakeLists.txt +++ b/examples/pybullet/CMakeLists.txt @@ -15,146 +15,7 @@ ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN) SET( pybullet_SRCS pybullet.c - ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.h - ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.h - ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.h - ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.h - ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.h - ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.h - ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.cpp - ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.h - ../../examples/SharedMemory/plugins/collisionFilterPlugin/collisionFilterPlugin.cpp - ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.cpp - ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.h - ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp - ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h - ../../examples/SharedMemory/IKTrajectoryHelper.cpp - ../../examples/SharedMemory/IKTrajectoryHelper.h - ../../examples/ExampleBrowser/InProcessExampleBrowser.cpp - ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.cpp - ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h - ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp - ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h - ../../examples/OpenGLWindow/SimpleCamera.cpp - ../../examples/OpenGLWindow/SimpleCamera.h - ../../examples/TinyRenderer/geometry.cpp - ../../examples/TinyRenderer/model.cpp - ../../examples/TinyRenderer/tgaimage.cpp - ../../examples/TinyRenderer/our_gl.cpp - ../../examples/TinyRenderer/TinyRenderer.cpp - ../../examples/SharedMemory/InProcessMemory.cpp - ../../examples/SharedMemory/PhysicsClient.cpp - ../../examples/SharedMemory/PhysicsClient.h - ../../examples/SharedMemory/PhysicsServer.cpp - ../../examples/SharedMemory/PhysicsServer.h - ../../examples/SharedMemory/PhysicsServerExample.cpp - ../../examples/SharedMemory/PhysicsServerExampleBullet2.cpp - ../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp - ../../examples/SharedMemory/PhysicsServerSharedMemory.cpp - ../../examples/SharedMemory/PhysicsServerSharedMemory.h - ../../examples/SharedMemory/PhysicsDirect.cpp - ../../examples/SharedMemory/PhysicsDirect.h - ../../examples/SharedMemory/PhysicsDirectC_API.cpp - ../../examples/SharedMemory/PhysicsDirectC_API.h - ../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp - ../../examples/SharedMemory/PhysicsServerCommandProcessor.h - ../../examples/SharedMemory/b3PluginManager.cpp - ../../examples/SharedMemory/b3PluginManager.h - ../../examples/SharedMemory/PhysicsClientSharedMemory.cpp - ../../examples/SharedMemory/PhysicsClientSharedMemory.h - ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp - ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h - ../../examples/SharedMemory/PhysicsClientC_API.cpp - ../../examples/SharedMemory/PhysicsClientC_API.h - ../../examples/SharedMemory/Win32SharedMemory.cpp - ../../examples/SharedMemory/Win32SharedMemory.h - ../../examples/SharedMemory/PosixSharedMemory.cpp - ../../examples/SharedMemory/PosixSharedMemory.h - ../../examples/Utils/b3ResourcePath.cpp - ../../examples/Utils/b3ResourcePath.h - ../../examples/Utils/RobotLoggingUtil.cpp - ../../examples/Utils/RobotLoggingUtil.h - ../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp - ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp - ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h - ../../examples/ThirdPartyLibs/stb_image/stb_image.cpp - ../../examples/ThirdPartyLibs/stb_image/stb_image_write.cpp - ../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.cpp - ../../examples/Importers/ImportObjDemo/LoadMeshFromObj.cpp - ../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp - ../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp - ../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp - ../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp - ../../examples/Importers/ImportURDFDemo/URDF2Bullet.cpp - ../../examples/Importers/ImportURDFDemo/UrdfParser.cpp - ../../examples/Importers/ImportURDFDemo/urdfStringSplit.cpp - ../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp - ../../examples/MultiThreading/b3PosixThreadSupport.cpp - ../../examples/MultiThreading/b3Win32ThreadSupport.cpp - ../../examples/MultiThreading/b3ThreadSupportInterface.cpp ) -IF(BUILD_PYBULLET_CLSOCKET) - ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET) -ENDIF(BUILD_PYBULLET_CLSOCKET) - -IF(WIN32) - LINK_LIBRARIES(${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) - IF(BUILD_PYBULLET_ENET) - ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET) - ENDIF(BUILD_PYBULLET_ENET) - IF(BUILD_PYBULLET_CLSOCKET) - ADD_DEFINITIONS(-DWIN32) - ENDIF(BUILD_PYBULLET_CLSOCKET) - -ELSE(WIN32) - IF(BUILD_PYBULLET_ENET) - ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET) - ENDIF(BUILD_PYBULLET_ENET) - - IF(BUILD_PYBULLET_CLSOCKET) - ADD_DEFINITIONS(${OSDEF}) - ENDIF(BUILD_PYBULLET_CLSOCKET) -ENDIF(WIN32) - -IF(BUILD_PYBULLET_ENET) - SET( - pybullet_SRCS - ${pybullet_SRCS} - ../../examples/SharedMemory/PhysicsClientUDP.cpp - ../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp - ../../examples/SharedMemory/PhysicsClientUDP.h - ../../examples/SharedMemory/PhysicsClientUDP_C_API.h - ../../examples/ThirdPartyLibs/enet/win32.c - ../../examples/ThirdPartyLibs/enet/unix.c - ../../examples/ThirdPartyLibs/enet/callbacks.c - ../../examples/ThirdPartyLibs/enet/compress.c - ../../examples/ThirdPartyLibs/enet/host.c - ../../examples/ThirdPartyLibs/enet/list.c - ../../examples/ThirdPartyLibs/enet/packet.c - ../../examples/ThirdPartyLibs/enet/peer.c - ../../examples/ThirdPartyLibs/enet/protocol.c - ) -ENDIF(BUILD_PYBULLET_ENET) - -IF(BUILD_PYBULLET_CLSOCKET) - SET( - pybullet_SRCS - ${pybullet_SRCS} - ../../examples/SharedMemory/PhysicsClientTCP.cpp - ../../examples/SharedMemory/PhysicsClientTCP.h - ../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp - ../../examples/SharedMemory/PhysicsClientTCP_C_API.h - ../../examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp - ../../examples/ThirdPartyLibs/clsocket/src/ActiveSocket.cpp - ../../examples/ThirdPartyLibs/clsocket/src/PassiveSocket.cpp - ) -ENDIF() ADD_LIBRARY(pybullet SHARED ${pybullet_SRCS}) @@ -179,19 +40,7 @@ ENDIF() TARGET_LINK_LIBRARIES( pybullet - BulletExampleBrowserLib - BulletFileLoader - BulletWorldImporter - BulletSoftBody - BulletDynamics - BulletCollision - BulletInverseDynamicsUtils - BulletInverseDynamics - LinearMath - OpenGLWindow - gwen - BussIK - Bullet3Common + bullet_c_api ) IF(WIN32) -- cgit v1.2.1 From e4f637c2e34bb41c9b199cb49621b32286a0436d Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Mon, 29 Apr 2019 11:58:53 -0400 Subject: Install C API --- examples/c_api/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/c_api/CMakeLists.txt b/examples/c_api/CMakeLists.txt index a41983dee..03585dc54 100644 --- a/examples/c_api/CMakeLists.txt +++ b/examples/c_api/CMakeLists.txt @@ -181,4 +181,6 @@ TARGET_LINK_LIBRARIES( gwen BussIK Bullet3Common -) \ No newline at end of file +) + +INSTALL(TARGETS bullet_c_api DESTINATION lib) -- cgit v1.2.1 From b6a18c5a3066b0b1a26b8bc3af6031484ae1c905 Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Mon, 29 Apr 2019 12:57:37 -0400 Subject: Copy installation commands from other bullet libs --- examples/c_api/CMakeLists.txt | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/examples/c_api/CMakeLists.txt b/examples/c_api/CMakeLists.txt index 03585dc54..c6790a1a3 100644 --- a/examples/c_api/CMakeLists.txt +++ b/examples/c_api/CMakeLists.txt @@ -183,4 +183,27 @@ TARGET_LINK_LIBRARIES( Bullet3Common ) -INSTALL(TARGETS bullet_c_api DESTINATION lib) +IF (INSTALL_LIBS) + IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + #INSTALL of other files requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS bullet_c_api DESTINATION lib) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS bullet_c_api RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + SET_TARGET_PROPERTIES(bullet_c_api PROPERTIES FRAMEWORK true) + + SET_TARGET_PROPERTIES(bullet_c_api PROPERTIES PUBLIC_HEADER "${Root_HDRS}") + # Have to list out sub-directories manually: + + + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) +ENDIF (INSTALL_LIBS) -- cgit v1.2.1 From 42d3e6190a3693ad69586999c9b3346308ac06fc Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Mon, 29 Apr 2019 14:46:47 -0400 Subject: Play around with build --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68e0a93bc..562fe9f1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -472,6 +472,7 @@ list (APPEND BULLET_LIBRARIES BulletInverseDynamics) list (APPEND BULLET_LIBRARIES BulletCollision) list (APPEND BULLET_LIBRARIES BulletDynamics) list (APPEND BULLET_LIBRARIES BulletSoftBody) +list (APPEND BULLET_LIBRARIES bullet_c_api) set (BULLET_USE_FILE ${BULLET_CONFIG_CMAKE_PATH}/UseBullet.cmake) configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/BulletConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake -- cgit v1.2.1 From cde9be4697cee95c26a2d3049785f7daeb5ffe65 Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Fri, 3 May 2019 15:48:16 -0400 Subject: Always link against OpenGL --- examples/c_api/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/c_api/CMakeLists.txt b/examples/c_api/CMakeLists.txt index c6790a1a3..b50c3c40d 100644 --- a/examples/c_api/CMakeLists.txt +++ b/examples/c_api/CMakeLists.txt @@ -98,7 +98,6 @@ IF(BUILD_PYBULLET_CLSOCKET) ENDIF(BUILD_PYBULLET_CLSOCKET) IF(WIN32) - LINK_LIBRARIES(${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) IF(BUILD_PYBULLET_ENET) ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET) ENDIF(BUILD_PYBULLET_ENET) @@ -183,6 +182,8 @@ TARGET_LINK_LIBRARIES( Bullet3Common ) +TARGET_LINK_LIBRARIES(bullet_c_api ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + IF (INSTALL_LIBS) IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) #INSTALL of other files requires CMake 2.6 -- cgit v1.2.1 From d5ef9d43825e88d7e61754f60ba5a85837c8145c Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Mon, 6 May 2019 17:17:15 -0400 Subject: Remove hail-Mary attempt at finding OpenGL --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 562fe9f1c..30934ee8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -291,8 +291,6 @@ IF (OPENGL_FOUND) MESSAGE(${OPENGL_LIBRARIES}) ELSE (OPENGL_FOUND) MESSAGE("OPENGL NOT FOUND") - SET(OPENGL_gl_LIBRARY opengl32) - SET(OPENGL_glu_LIBRARY glu32) ENDIF (OPENGL_FOUND) -- cgit v1.2.1