Run cmake-format

cmake-format --command-case upper --dangle-parens true CMakeLists.txt
This commit is contained in:
Gustavo Goretkin
2019-04-29 11:03:41 -04:00
parent aec9968e28
commit 9009ca914e

View File

@@ -1,164 +1,159 @@
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/src
${BULLET_PHYSICS_SOURCE_DIR}/examples ${BULLET_PHYSICS_SOURCE_DIR}/examples
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src
${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}
) )
IF(BUILD_PYBULLET_NUMPY) IF(BUILD_PYBULLET_NUMPY)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(${PYTHON_NUMPY_INCLUDE_DIR})
${PYTHON_NUMPY_INCLUDE_DIR}
)
ENDIF() ENDIF()
ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN) ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN)
SET(pybullet_SRCS SET(
pybullet.c pybullet_SRCS
../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.cpp pybullet.c
../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.h ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.cpp
../../examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp ../../examples/SharedMemory/plugins/stablePDPlugin/SpAlg.h
../../examples/SharedMemory/plugins/stablePDPlugin/Shape.h ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.cpp
../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.cpp ../../examples/SharedMemory/plugins/stablePDPlugin/Shape.h
../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.h ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.cpp
../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.cpp ../../examples/SharedMemory/plugins/stablePDPlugin/RBDUtil.h
../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.h ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.cpp
../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.cpp ../../examples/SharedMemory/plugins/stablePDPlugin/RBDModel.h
../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.h ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.cpp
../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.cpp ../../examples/SharedMemory/plugins/stablePDPlugin/MathUtil.h
../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.h ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.cpp
../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.cpp ../../examples/SharedMemory/plugins/stablePDPlugin/KinTree.h
../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.h ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.cpp
../../examples/SharedMemory/plugins/collisionFilterPlugin/collisionFilterPlugin.cpp ../../examples/SharedMemory/plugins/stablePDPlugin/BulletConversion.h
../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.cpp ../../examples/SharedMemory/plugins/collisionFilterPlugin/collisionFilterPlugin.cpp
../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.h ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.cpp
../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp ../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.h
../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp
../../examples/SharedMemory/IKTrajectoryHelper.cpp ../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h
../../examples/SharedMemory/IKTrajectoryHelper.h ../../examples/SharedMemory/IKTrajectoryHelper.cpp
../../examples/ExampleBrowser/InProcessExampleBrowser.cpp ../../examples/SharedMemory/IKTrajectoryHelper.h
../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.cpp ../../examples/ExampleBrowser/InProcessExampleBrowser.cpp
../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.cpp
../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp ../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h
../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp
../../examples/OpenGLWindow/SimpleCamera.cpp ../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h
../../examples/OpenGLWindow/SimpleCamera.h ../../examples/OpenGLWindow/SimpleCamera.cpp
../../examples/TinyRenderer/geometry.cpp ../../examples/OpenGLWindow/SimpleCamera.h
../../examples/TinyRenderer/model.cpp ../../examples/TinyRenderer/geometry.cpp
../../examples/TinyRenderer/tgaimage.cpp ../../examples/TinyRenderer/model.cpp
../../examples/TinyRenderer/our_gl.cpp ../../examples/TinyRenderer/tgaimage.cpp
../../examples/TinyRenderer/TinyRenderer.cpp ../../examples/TinyRenderer/our_gl.cpp
../../examples/SharedMemory/InProcessMemory.cpp ../../examples/TinyRenderer/TinyRenderer.cpp
../../examples/SharedMemory/PhysicsClient.cpp ../../examples/SharedMemory/InProcessMemory.cpp
../../examples/SharedMemory/PhysicsClient.h ../../examples/SharedMemory/PhysicsClient.cpp
../../examples/SharedMemory/PhysicsServer.cpp ../../examples/SharedMemory/PhysicsClient.h
../../examples/SharedMemory/PhysicsServer.h ../../examples/SharedMemory/PhysicsServer.cpp
../../examples/SharedMemory/PhysicsServerExample.cpp ../../examples/SharedMemory/PhysicsServer.h
../../examples/SharedMemory/PhysicsServerExampleBullet2.cpp ../../examples/SharedMemory/PhysicsServerExample.cpp
../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp ../../examples/SharedMemory/PhysicsServerExampleBullet2.cpp
../../examples/SharedMemory/PhysicsServerSharedMemory.cpp ../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp
../../examples/SharedMemory/PhysicsServerSharedMemory.h ../../examples/SharedMemory/PhysicsServerSharedMemory.cpp
../../examples/SharedMemory/PhysicsDirect.cpp ../../examples/SharedMemory/PhysicsServerSharedMemory.h
../../examples/SharedMemory/PhysicsDirect.h ../../examples/SharedMemory/PhysicsDirect.cpp
../../examples/SharedMemory/PhysicsDirectC_API.cpp ../../examples/SharedMemory/PhysicsDirect.h
../../examples/SharedMemory/PhysicsDirectC_API.h ../../examples/SharedMemory/PhysicsDirectC_API.cpp
../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp ../../examples/SharedMemory/PhysicsDirectC_API.h
../../examples/SharedMemory/PhysicsServerCommandProcessor.h ../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp
../../examples/SharedMemory/b3PluginManager.cpp ../../examples/SharedMemory/PhysicsServerCommandProcessor.h
../../examples/SharedMemory/b3PluginManager.h ../../examples/SharedMemory/b3PluginManager.cpp
../../examples/SharedMemory/b3PluginManager.h
../../examples/SharedMemory/PhysicsClientSharedMemory.cpp ../../examples/SharedMemory/PhysicsClientSharedMemory.cpp
../../examples/SharedMemory/PhysicsClientSharedMemory.h ../../examples/SharedMemory/PhysicsClientSharedMemory.h
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h ../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h
../../examples/SharedMemory/PhysicsClientC_API.cpp
../../examples/SharedMemory/PhysicsClientC_API.cpp ../../examples/SharedMemory/PhysicsClientC_API.h
../../examples/SharedMemory/PhysicsClientC_API.h ../../examples/SharedMemory/Win32SharedMemory.cpp
../../examples/SharedMemory/Win32SharedMemory.cpp ../../examples/SharedMemory/Win32SharedMemory.h
../../examples/SharedMemory/Win32SharedMemory.h ../../examples/SharedMemory/PosixSharedMemory.cpp
../../examples/SharedMemory/PosixSharedMemory.cpp ../../examples/SharedMemory/PosixSharedMemory.h
../../examples/SharedMemory/PosixSharedMemory.h ../../examples/Utils/b3ResourcePath.cpp
../../examples/Utils/b3ResourcePath.cpp ../../examples/Utils/b3ResourcePath.h
../../examples/Utils/b3ResourcePath.h ../../examples/Utils/RobotLoggingUtil.cpp
../../examples/Utils/RobotLoggingUtil.cpp ../../examples/Utils/RobotLoggingUtil.h
../../examples/Utils/RobotLoggingUtil.h ../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp ../../examples/ThirdPartyLibs/stb_image/stb_image.cpp
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h ../../examples/ThirdPartyLibs/stb_image/stb_image_write.cpp
../../examples/ThirdPartyLibs/stb_image/stb_image.cpp ../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.cpp
../../examples/ThirdPartyLibs/stb_image/stb_image_write.cpp ../../examples/Importers/ImportObjDemo/LoadMeshFromObj.cpp
../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.cpp ../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp
../../examples/Importers/ImportObjDemo/LoadMeshFromObj.cpp ../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp
../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp ../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp
../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp ../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp
../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp ../../examples/Importers/ImportURDFDemo/URDF2Bullet.cpp
../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp ../../examples/Importers/ImportURDFDemo/UrdfParser.cpp
../../examples/Importers/ImportURDFDemo/URDF2Bullet.cpp ../../examples/Importers/ImportURDFDemo/urdfStringSplit.cpp
../../examples/Importers/ImportURDFDemo/UrdfParser.cpp ../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp
../../examples/Importers/ImportURDFDemo/urdfStringSplit.cpp ../../examples/MultiThreading/b3PosixThreadSupport.cpp
../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp ../../examples/MultiThreading/b3Win32ThreadSupport.cpp
../../examples/MultiThreading/b3PosixThreadSupport.cpp ../../examples/MultiThreading/b3ThreadSupportInterface.cpp
../../examples/MultiThreading/b3Win32ThreadSupport.cpp
../../examples/MultiThreading/b3ThreadSupportInterface.cpp
) )
IF(BUILD_PYBULLET_CLSOCKET) IF(BUILD_PYBULLET_CLSOCKET)
ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET) ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET)
ENDIF(BUILD_PYBULLET_CLSOCKET) ENDIF(BUILD_PYBULLET_CLSOCKET)
IF(WIN32) IF(WIN32)
LINK_LIBRARIES( LINK_LIBRARIES(${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} IF(BUILD_PYBULLET_ENET)
) ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET)
IF(BUILD_PYBULLET_ENET) ENDIF(BUILD_PYBULLET_ENET)
ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET) IF(BUILD_PYBULLET_CLSOCKET)
ENDIF(BUILD_PYBULLET_ENET) ADD_DEFINITIONS(-DWIN32)
IF(BUILD_PYBULLET_CLSOCKET) ENDIF(BUILD_PYBULLET_CLSOCKET)
ADD_DEFINITIONS(-DWIN32)
ENDIF(BUILD_PYBULLET_CLSOCKET)
ELSE(WIN32) ELSE(WIN32)
IF(BUILD_PYBULLET_ENET) IF(BUILD_PYBULLET_ENET)
ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET) ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET)
ENDIF(BUILD_PYBULLET_ENET) ENDIF(BUILD_PYBULLET_ENET)
IF(BUILD_PYBULLET_CLSOCKET) IF(BUILD_PYBULLET_CLSOCKET)
ADD_DEFINITIONS(${OSDEF}) ADD_DEFINITIONS(${OSDEF})
ENDIF(BUILD_PYBULLET_CLSOCKET) ENDIF(BUILD_PYBULLET_CLSOCKET)
ENDIF(WIN32) ENDIF(WIN32)
IF(BUILD_PYBULLET_ENET) IF(BUILD_PYBULLET_ENET)
set(pybullet_SRCS ${pybullet_SRCS} SET(
../../examples/SharedMemory/PhysicsClientUDP.cpp pybullet_SRCS
../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp ${pybullet_SRCS}
../../examples/SharedMemory/PhysicsClientUDP.h ../../examples/SharedMemory/PhysicsClientUDP.cpp
../../examples/SharedMemory/PhysicsClientUDP_C_API.h ../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp
../../examples/ThirdPartyLibs/enet/win32.c ../../examples/SharedMemory/PhysicsClientUDP.h
../../examples/ThirdPartyLibs/enet/unix.c ../../examples/SharedMemory/PhysicsClientUDP_C_API.h
../../examples/ThirdPartyLibs/enet/callbacks.c ../../examples/ThirdPartyLibs/enet/win32.c
../../examples/ThirdPartyLibs/enet/compress.c ../../examples/ThirdPartyLibs/enet/unix.c
../../examples/ThirdPartyLibs/enet/host.c ../../examples/ThirdPartyLibs/enet/callbacks.c
../../examples/ThirdPartyLibs/enet/list.c ../../examples/ThirdPartyLibs/enet/compress.c
../../examples/ThirdPartyLibs/enet/packet.c ../../examples/ThirdPartyLibs/enet/host.c
../../examples/ThirdPartyLibs/enet/peer.c ../../examples/ThirdPartyLibs/enet/list.c
../../examples/ThirdPartyLibs/enet/protocol.c ../../examples/ThirdPartyLibs/enet/packet.c
) ../../examples/ThirdPartyLibs/enet/peer.c
../../examples/ThirdPartyLibs/enet/protocol.c
)
ENDIF(BUILD_PYBULLET_ENET) ENDIF(BUILD_PYBULLET_ENET)
IF(BUILD_PYBULLET_CLSOCKET) IF(BUILD_PYBULLET_CLSOCKET)
set(pybullet_SRCS ${pybullet_SRCS} SET(
../../examples/SharedMemory/PhysicsClientTCP.cpp pybullet_SRCS
../../examples/SharedMemory/PhysicsClientTCP.h ${pybullet_SRCS}
../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp ../../examples/SharedMemory/PhysicsClientTCP.cpp
../../examples/SharedMemory/PhysicsClientTCP_C_API.h ../../examples/SharedMemory/PhysicsClientTCP.h
../../examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp ../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp
../../examples/ThirdPartyLibs/clsocket/src/ActiveSocket.cpp ../../examples/SharedMemory/PhysicsClientTCP_C_API.h
../../examples/ThirdPartyLibs/clsocket/src/PassiveSocket.cpp ../../examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp
) ../../examples/ThirdPartyLibs/clsocket/src/ActiveSocket.cpp
../../examples/ThirdPartyLibs/clsocket/src/PassiveSocket.cpp
)
ENDIF() ENDIF()
ADD_LIBRARY(pybullet SHARED ${pybullet_SRCS}) 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 SOVERSION ${BULLET_VERSION})
SET_TARGET_PROPERTIES(pybullet PROPERTIES DEBUG_POSTFIX "_d") SET_TARGET_PROPERTIES(pybullet PROPERTIES DEBUG_POSTFIX "_d")
IF(WIN32) IF(WIN32)
IF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) IF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET)
TARGET_LINK_LIBRARIES(pybullet ws2_32 ) TARGET_LINK_LIBRARIES(pybullet ws2_32)
ENDIF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET) ENDIF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET)
SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".pyd" ) SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".pyd")
ENDIF(WIN32) ENDIF(WIN32)
IF (APPLE) IF(APPLE)
SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".so" ) SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".so")
ENDIF() ENDIF()
TARGET_LINK_LIBRARIES(
pybullet
BulletExampleBrowserLib
BulletFileLoader
BulletWorldImporter
BulletSoftBody
BulletDynamics
BulletCollision
BulletInverseDynamicsUtils
BulletInverseDynamics
LinearMath
OpenGLWindow
gwen
BussIK
Bullet3Common
)
IF(WIN32)
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}) TARGET_LINK_LIBRARIES(pybullet ${PYTHON_LIBRARIES})
ELSEIF (APPLE) ELSEIF(APPLE)
SET_TARGET_PROPERTIES(pybullet PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") SET_TARGET_PROPERTIES(
ENDIF () pybullet
PROPERTIES LINK_FLAGS "-undefined dynamic_lookup"
)
ENDIF()
# else Linux: dont link # else Linux: dont link
IF(WIN32) IF(WIN32)
SET(PYTHON_SITE_PACKAGES Lib/site-packages CACHE PATH "Python install path") SET(PYTHON_SITE_PACKAGES Lib/site-packages CACHE PATH "Python install path")
ELSE() 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() ENDIF()
INSTALL(TARGETS pybullet DESTINATION ${PYTHON_SITE_PACKAGES}) INSTALL(TARGETS pybullet DESTINATION ${PYTHON_SITE_PACKAGES})