Skip to content

Commit

Permalink
fix cmake/premake builds
Browse files Browse the repository at this point in the history
  • Loading branch information
erwincoumans committed Mar 22, 2020
1 parent 377069b commit 0b6457d
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Extras/BulletRobotics/premake4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ if not _OPTIONS["no-enet"] then
links {"clsocket"}

files {
"../../examples/SharedMemory/RemoteGUIHelperTCP.cpp",
"../../examples/SharedMemory/PhysicsClientTCP.cpp",
"../../examples/SharedMemory/GraphicsServerExample.cpp",
"../../examples/SharedMemory/PhysicsClientTCP.h",
"../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp",
"../../examples/SharedMemory/PhysicsClientTCP_C_API.h",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ B3_SHARED_API b3PhysicsClientHandle b3CreateInProcessPhysicsServerFromExistingEx
}

#ifdef BT_ENABLE_CLSOCKET

#include "RemoteGUIHelperTCP.h"

B3_SHARED_API b3PhysicsClientHandle b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnectTCP(const char* hostName, int port)
Expand Down
3 changes: 2 additions & 1 deletion examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ extern "C"
B3_SHARED_API b3PhysicsClientHandle b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect3(void* guiHelperPtr, int sharedMemoryKey);
//create a shared memory physics server, with a RemoteGUIHelper (connect to remote graphics server) and allow to set shared memory key
B3_SHARED_API b3PhysicsClientHandle b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect4(void* guiHelperPtr, int sharedMemoryKey);
#ifdef BT_ENABLE_CLSOCKET
B3_SHARED_API b3PhysicsClientHandle b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnectTCP(const char* hostName, int port);

#endif
///ignore the following APIs, they are for internal use for example browser
void b3InProcessRenderSceneInternal(b3PhysicsClientHandle clientHandle);
void b3InProcessDebugDrawInternal(b3PhysicsClientHandle clientHandle, int debugDrawMode);
Expand Down
1 change: 1 addition & 0 deletions examples/TwoJoint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ SET(RobotSimulator_SRCS
../SharedMemory/GraphicsServerExample.cpp
../SharedMemory/GraphicsClientExample.cpp
../SharedMemory/RemoteGUIHelper.cpp
../SharedMemory/RemoteGUIHelperTCP.cpp
../SharedMemory/GraphicsServerExample.h
../SharedMemory/GraphicsClientExample.h
../SharedMemory/RemoteGUIHelper.h
Expand Down
5 changes: 0 additions & 5 deletions examples/pybullet/gym/pybullet_utils/graphicsClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
p.loadURDF("plane.urdf")
p.loadURDF("r2d2.urdf", [0,0,3])
p.setGravity(0,0,-10)
gravId = p.addUserDebugParameter("gravity",0,10,0)
while p.isConnected():
p.stepSimulation()

grav = p.readUserDebugParameter(gravId)
#print("grav=",grav)
time.sleep(1./240.)

29 changes: 29 additions & 0 deletions test/SharedMemory/premake4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,33 @@ project ("Test_PhysicsServerInProcessExampleBrowser")
}
end

if not _OPTIONS["no-clsocket"] then

includedirs {"../../examples/ThirdPartyLibs/clsocket/src"}

if os.is("Windows") then
defines { "WIN32" }
links {"Ws2_32","Winmm"}
end
if os.is("Linux") then
defines {"_LINUX"}
end
if os.is("MacOSX") then
defines {"_DARWIN"}
end

links {"clsocket"}

files {
"../../examples/SharedMemory/PhysicsClientTCP.cpp",
"../../examples/SharedMemory/PhysicsClientTCP.h",
"../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp",
"../../examples/SharedMemory/PhysicsClientTCP_C_API.h",
}
defines {"BT_ENABLE_CLSOCKET"}
end


files {
"test.c",
"../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp",
Expand All @@ -380,6 +407,8 @@ project ("Test_PhysicsServerInProcessExampleBrowser")
"../../examples/SharedMemory/IKTrajectoryHelper.cpp",
"../../examples/SharedMemory/IKTrajectoryHelper.h",
"../../examples/SharedMemory/RemoteGUIHelper.cpp",
"../../examples/SharedMemory/RemoteGUIHelperTCP.cpp",
"../../examples/SharedMemory/GraphicsServerExample.cpp",
"../../examples/ExampleBrowser/InProcessExampleBrowser.cpp",
"../../examples/SharedMemory/InProcessMemory.cpp",
"../../examples/SharedMemory/PhysicsClient.cpp",
Expand Down

0 comments on commit 0b6457d

Please sign in to comment.