2013-03-11 21:03:27 +00:00
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
solution "0_Bullet3Solution"
|
2013-03-11 21:03:27 +00:00
|
|
|
|
2014-08-22 21:41:21 +00:00
|
|
|
local osversion = os.getversion()
|
2015-12-04 02:58:10 +00:00
|
|
|
print(string.format(" %d.%d.%d (%s)",
|
2014-08-22 21:41:21 +00:00
|
|
|
osversion.majorversion, osversion.minorversion, osversion.revision,
|
|
|
|
osversion.description))
|
2015-12-04 02:58:10 +00:00
|
|
|
|
2013-03-11 21:03:27 +00:00
|
|
|
if _ACTION == "vs2010" or _ACTION=="vs2008" then
|
2016-07-12 12:57:05 +00:00
|
|
|
buildoptions
|
|
|
|
{
|
|
|
|
-- Multithreaded compiling
|
|
|
|
"/MP",
|
|
|
|
-- Disable a few useless warnings
|
|
|
|
"/wd4244",
|
|
|
|
"/wd4267"
|
|
|
|
}
|
2014-05-14 04:52:46 +00:00
|
|
|
end
|
|
|
|
|
2013-03-11 21:03:27 +00:00
|
|
|
act = ""
|
2014-05-14 04:52:46 +00:00
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
if _ACTION then
|
|
|
|
act = _ACTION
|
|
|
|
end
|
2013-03-11 21:03:27 +00:00
|
|
|
|
2018-09-06 00:58:14 +00:00
|
|
|
projectRootDir = os.getcwd() .. "/../"
|
|
|
|
print("Project root directory: " .. projectRootDir);
|
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
newoption {
|
|
|
|
trigger = "ios",
|
|
|
|
description = "Enable iOS target (requires xcode4)"
|
2018-02-22 17:08:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "enable_system_glx",
|
|
|
|
description = "Try to link against system glx instead of using glad_glx (default)"
|
2015-05-12 16:17:27 +00:00
|
|
|
}
|
|
|
|
|
2014-08-19 05:19:34 +00:00
|
|
|
newoption
|
2015-12-04 06:00:52 +00:00
|
|
|
{
|
2016-03-25 04:15:49 +00:00
|
|
|
trigger = "enable_system_opengl",
|
|
|
|
description = "Try to link and use the system OpenGL headers version instead of dynamically loading OpenGL (dlopen is default)"
|
2015-12-04 06:00:52 +00:00
|
|
|
}
|
2014-08-19 05:19:34 +00:00
|
|
|
|
2016-06-30 23:03:38 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "enable_openvr",
|
|
|
|
description = "Enable experimental Virtual Reality examples, using OpenVR for HTC Vive and Oculus Rift"
|
|
|
|
}
|
2014-08-19 05:19:34 +00:00
|
|
|
newoption
|
2015-12-04 06:00:52 +00:00
|
|
|
{
|
2016-03-25 04:15:49 +00:00
|
|
|
trigger = "enable_system_x11",
|
|
|
|
description = "Try to link and use system X11 headers instead of dynamically loading X11 (dlopen is default)"
|
2015-12-04 06:00:52 +00:00
|
|
|
}
|
2014-08-19 05:19:34 +00:00
|
|
|
|
2017-10-25 17:00:45 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "enable_static_vr_plugin",
|
|
|
|
description = "Statically link vr plugin (in examples/SharedMemory/plugins/vrSyncPlugin)"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-06 19:05:25 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "noopengl3",
|
|
|
|
description = "Don't compile any OpenGL3+ code"
|
|
|
|
}
|
2014-08-19 05:19:34 +00:00
|
|
|
|
2014-01-28 18:25:04 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "midi",
|
|
|
|
description = "Use Midi controller to control parameters"
|
|
|
|
}
|
2018-08-30 04:12:13 +00:00
|
|
|
|
Thanks to @dchichkov for some of the fixes in the eglRendererPlugin!
Rename tinyRenderer -> eglRenderer in the eglRendererPlugin.
Allow to run the eglRendererPlugin to run on Windows (not in EGL mode but Win32OpenGLWindow mode)
Here is a script I tested on Windows:
~~~~~~~~~~~~
mport pybullet as p
import time
p.connect(p.DIRECT)
plugin = p.loadPlugin("e:/develop/bullet3/bin/pybullet_eglRendererPlugin_vs2010_x64_debug.dll","_eglRendererPlugin")
print("plugin=",plugin)
p.setGravity(0,0,-10)
p.loadURDF("plane.urdf",[0,0,-1])
p.loadURDF("r2d2.urdf")
pixelWidth = 320
pixelHeight = 220
while (1):
p.stepSimulation()
viewMatrix = [1.0, 0.0, -0.0, 0.0, -0.0, 0.1736481785774231, -0.9848078489303589, 0.0, 0.0, 0.9848078489303589, 0.1736481785774231, 0.0, -0.0, -5.960464477539063e-08, -4.0, 1.0]
projectionMatrix = [1.0825318098068237, 0.0, 0.0, 0.0, 0.0, 1.732050895690918, 0.0, 0.0, 0.0, 0.0, -1.0002000331878662, -1.0, 0.0, 0.0, -0.020002000033855438, 0.0]
#img_arr = p.getCameraImage(pixelWidth, pixelHeight, viewMatrix,projectionMatrix, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
img_arr = p.getCameraImage(pixelWidth, pixelHeight, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
#print("img_arr=",img_arr)
time.sleep(1)
~~~~~~~~~~~~~
2018-09-09 20:37:49 +00:00
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "enable_egl",
|
|
|
|
description = "Build an experimental eglPlugin"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-08-30 04:12:13 +00:00
|
|
|
newoption
|
|
|
|
{
|
2018-09-04 21:49:12 +00:00
|
|
|
trigger = "enable_grpc",
|
2018-08-30 04:12:13 +00:00
|
|
|
description = "Build GRPC server/client features for PyBullet/BulletRobotics"
|
2018-09-04 21:49:12 +00:00
|
|
|
|
2018-08-30 04:12:13 +00:00
|
|
|
}
|
2018-09-04 21:49:12 +00:00
|
|
|
|
|
|
|
if os.is("Linux") then
|
|
|
|
default_grpc_include_dir = "usr/local/include/GRPC"
|
2018-09-06 00:58:14 +00:00
|
|
|
default_grpc_lib_dir = "/usr/local/lib"
|
|
|
|
default_protobuf_include_dir = "/usr/local/include/protobuf"
|
|
|
|
default_protobuf_lib_dir = "/usr/local/lib"
|
2018-09-04 21:49:12 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
if os.is("macosx") then
|
|
|
|
default_grpc_include_dir = "/usr/local/Cellar/grpc/1.14.1/include"
|
|
|
|
default_grpc_lib_dir = "/usr/local/Cellar/grpc/1.14.1/lib"
|
2018-09-06 00:58:14 +00:00
|
|
|
default_protobuf_include_dir = "/usr/local/Cellar/protobuf/3.6.0/include"
|
2018-09-04 21:49:12 +00:00
|
|
|
default_protobuf_lib_dir = "/usr/local/Cellar/protobuf/3.6.0/lib"
|
|
|
|
end
|
|
|
|
|
|
|
|
if os.is("Windows") then
|
2018-09-06 00:58:14 +00:00
|
|
|
default_grpc_include_dir = projectRootDir .. "examples/ThirdPartyLibs/grpc/include"
|
|
|
|
default_grpc_lib_dir = projectRootDir .. "examples/ThirdPartyLibs/grpc/lib"
|
|
|
|
default_protobuf_include_dir =projectRootDir .. "examples/ThirdPartyLibs/grpc/include"
|
|
|
|
default_protobuf_lib_dir = projectRootDir .. "examples/ThirdPartyLibs/grpc/lib"
|
2018-09-04 21:49:12 +00:00
|
|
|
end
|
2018-08-30 04:12:13 +00:00
|
|
|
|
2018-09-04 21:49:12 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "grpc_include_dir",
|
|
|
|
value = default_grpc_include_dir,
|
|
|
|
description = "(optional) GRPC include directory"
|
|
|
|
}
|
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "grpc_lib_dir",
|
|
|
|
value = default_grpc_lib_dir,
|
|
|
|
description = "(optional) GRPC library directory "
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "protobuf_include_dir",
|
|
|
|
value = default_protobuf_include_dir,
|
|
|
|
description = "(optional) protobuf include directory"
|
|
|
|
}
|
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "protobuf_lib_dir",
|
|
|
|
value = default_protobuf_lib_dir,
|
|
|
|
description = "(optional) protobuf library directory "
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-06 00:58:14 +00:00
|
|
|
if not _OPTIONS["grpc_lib_dir"] then
|
|
|
|
_OPTIONS["grpc_lib_dir"] = default_grpc_lib_dir
|
|
|
|
end
|
|
|
|
if not _OPTIONS["grpc_include_dir"] then
|
|
|
|
_OPTIONS["grpc_include_dir"] = default_grpc_include_dir
|
|
|
|
end
|
|
|
|
if not _OPTIONS["protobuf_include_dir"] then
|
|
|
|
_OPTIONS["protobuf_include_dir"] = default_protobuf_include_dir
|
|
|
|
end
|
|
|
|
|
|
|
|
if not _OPTIONS["protobuf_lib_dir"] then
|
|
|
|
_OPTIONS["protobuf_lib_dir"] = default_protobuf_lib_dir
|
|
|
|
end
|
|
|
|
|
Thanks to @dchichkov for some of the fixes in the eglRendererPlugin!
Rename tinyRenderer -> eglRenderer in the eglRendererPlugin.
Allow to run the eglRendererPlugin to run on Windows (not in EGL mode but Win32OpenGLWindow mode)
Here is a script I tested on Windows:
~~~~~~~~~~~~
mport pybullet as p
import time
p.connect(p.DIRECT)
plugin = p.loadPlugin("e:/develop/bullet3/bin/pybullet_eglRendererPlugin_vs2010_x64_debug.dll","_eglRendererPlugin")
print("plugin=",plugin)
p.setGravity(0,0,-10)
p.loadURDF("plane.urdf",[0,0,-1])
p.loadURDF("r2d2.urdf")
pixelWidth = 320
pixelHeight = 220
while (1):
p.stepSimulation()
viewMatrix = [1.0, 0.0, -0.0, 0.0, -0.0, 0.1736481785774231, -0.9848078489303589, 0.0, 0.0, 0.9848078489303589, 0.1736481785774231, 0.0, -0.0, -5.960464477539063e-08, -4.0, 1.0]
projectionMatrix = [1.0825318098068237, 0.0, 0.0, 0.0, 0.0, 1.732050895690918, 0.0, 0.0, 0.0, 0.0, -1.0002000331878662, -1.0, 0.0, 0.0, -0.020002000033855438, 0.0]
#img_arr = p.getCameraImage(pixelWidth, pixelHeight, viewMatrix,projectionMatrix, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
img_arr = p.getCameraImage(pixelWidth, pixelHeight, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
#print("img_arr=",img_arr)
time.sleep(1)
~~~~~~~~~~~~~
2018-09-09 20:37:49 +00:00
|
|
|
|
|
|
|
if _OPTIONS["enable_egl"] then
|
|
|
|
function initEGL()
|
|
|
|
defines {"BT_USE_EGL"}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-09-06 00:58:14 +00:00
|
|
|
|
2018-09-04 21:49:12 +00:00
|
|
|
if _OPTIONS["enable_grpc"] then
|
|
|
|
function initGRPC()
|
2018-09-06 00:58:14 +00:00
|
|
|
|
2018-09-04 21:49:12 +00:00
|
|
|
|
2018-09-06 00:58:14 +00:00
|
|
|
print "BT_ENABLE_GRPC"
|
|
|
|
|
|
|
|
print("grpc_include_dir=")
|
|
|
|
print(_OPTIONS["grpc_include_dir"])
|
|
|
|
print("grpc_lib_dir=")
|
|
|
|
print(_OPTIONS["grpc_lib_dir"])
|
|
|
|
print("protobuf_include_dir=")
|
|
|
|
print(_OPTIONS["protobuf_include_dir"])
|
|
|
|
print("protobuf_lib_dir=")
|
|
|
|
print(_OPTIONS["protobuf_lib_dir"])
|
|
|
|
|
|
|
|
defines {"BT_ENABLE_GRPC"}
|
|
|
|
|
|
|
|
if os.is("macosx") then
|
|
|
|
buildoptions { "-std=c++11" }
|
|
|
|
links{ "dl"}
|
|
|
|
end
|
|
|
|
|
|
|
|
if os.is("Linux") then
|
|
|
|
buildoptions { "-std=c++11" }
|
|
|
|
links{ "dl"}
|
|
|
|
end
|
|
|
|
|
|
|
|
if os.is("Windows") then
|
|
|
|
defines {"_WIN32_WINNT=0x0600"}
|
|
|
|
links{ "zlibstatic","ssl","crypto"}
|
|
|
|
end
|
|
|
|
|
|
|
|
includedirs {
|
2018-09-07 22:44:33 +00:00
|
|
|
projectRootDir .. "examples", _OPTIONS["grpc_include_dir"], _OPTIONS["protobuf_include_dir"],
|
2018-09-06 00:58:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if os.is("Windows") then
|
|
|
|
configuration {"x64", "debug"}
|
|
|
|
libdirs {_OPTIONS["grpc_lib_dir"] .. "/win64_debug" , _OPTIONS["protobuf_lib_dir"] .. "win64_debug",}
|
|
|
|
configuration {"x86", "debug"}
|
|
|
|
libdirs {_OPTIONS["grpc_lib_dir"] .. "/win32_debug" , _OPTIONS["protobuf_lib_dir"] .. "win32_debug",}
|
|
|
|
configuration {"x64", "release"}
|
|
|
|
libdirs {_OPTIONS["grpc_lib_dir"] .. "/win64_release", _OPTIONS["protobuf_lib_dir"] .. "win64_release",}
|
|
|
|
configuration {"x86", "release"}
|
|
|
|
libdirs {_OPTIONS["grpc_lib_dir"] .. "/win32_release" , _OPTIONS["protobuf_lib_dir"] .. "win32_release",}
|
|
|
|
configuration{}
|
|
|
|
|
|
|
|
else
|
|
|
|
libdirs {_OPTIONS["grpc_lib_dir"], _OPTIONS["protobuf_lib_dir"],}
|
|
|
|
end
|
|
|
|
|
|
|
|
links { "grpc","grpc++", "grpc++_reflection", "gpr", "protobuf"}
|
2018-09-07 22:44:33 +00:00
|
|
|
files {
|
|
|
|
projectRootDir .. "examples/SharedMemory/grpc/ConvertGRPCBullet.cpp",
|
2018-09-06 00:58:14 +00:00
|
|
|
projectRootDir .. "examples/SharedMemory/grpc/ConvertGRPCBullet.h",
|
2018-09-07 22:44:33 +00:00
|
|
|
projectRootDir .. "examples/SharedMemory/grpc/proto/pybullet.grpc.pb.cpp",
|
|
|
|
projectRootDir .. "examples/SharedMemory/grpc/proto/pybullet.grpc.pb.h",
|
|
|
|
projectRootDir .. "examples/SharedMemory/grpc/proto/pybullet.pb.cpp",
|
|
|
|
projectRootDir .. "examples/SharedMemory/grpc/proto/pybullet.pb.h", }
|
2018-09-06 00:58:14 +00:00
|
|
|
end
|
2018-09-04 21:49:12 +00:00
|
|
|
|
|
|
|
end
|
2014-05-14 04:52:46 +00:00
|
|
|
|
2016-11-17 00:12:59 +00:00
|
|
|
-- _OPTIONS["midi"] = "1";
|
2014-05-14 04:52:46 +00:00
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "no-demos",
|
|
|
|
description = "Don't build demos"
|
|
|
|
}
|
2013-05-05 02:50:56 +00:00
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "no-extras",
|
|
|
|
description = "Don't build Extras"
|
|
|
|
}
|
2015-12-04 04:49:31 +00:00
|
|
|
|
2017-02-22 14:13:32 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "standalone-examples",
|
|
|
|
description = "Build standalone examples with reduced dependencies."
|
|
|
|
}
|
|
|
|
|
2017-02-19 20:08:58 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "no-clsocket",
|
|
|
|
description = "Disable clsocket and clsocket tests (used for optional TCP networking in pybullet and shared memory C-API)"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-05-05 02:50:56 +00:00
|
|
|
newoption
|
|
|
|
{
|
2016-11-04 20:15:10 +00:00
|
|
|
trigger = "no-enet",
|
2017-02-19 20:08:58 +00:00
|
|
|
description = "Disable enet and enet tests (used for optional UDP networking in pybullet and shared memory C-API)"
|
2013-05-05 02:50:56 +00:00
|
|
|
}
|
2015-12-04 02:58:10 +00:00
|
|
|
|
2015-05-13 16:17:59 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "lua",
|
|
|
|
description = "Enable Lua scipting support in Example Browser"
|
|
|
|
}
|
2014-05-14 04:52:46 +00:00
|
|
|
|
2016-04-30 18:18:54 +00:00
|
|
|
newoption
|
|
|
|
{
|
2016-08-10 01:40:12 +00:00
|
|
|
trigger = "enable_pybullet",
|
|
|
|
description = "Enable high-level Python scripting of Bullet with URDF/SDF import and synthetic camera."
|
2016-04-30 18:18:54 +00:00
|
|
|
}
|
|
|
|
|
2016-08-10 01:40:12 +00:00
|
|
|
if os.is("Linux") then
|
|
|
|
default_python_include_dir = "/usr/include/python2.7"
|
|
|
|
default_python_lib_dir = "/usr/local/lib/"
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
if os.is("Windows") then
|
2016-09-02 04:37:52 +00:00
|
|
|
default_python_include_dir = "C:/Python-3.5.2/include"
|
2016-08-13 19:21:18 +00:00
|
|
|
default_python_lib_dir = "C:/Python-3.5.2/libs"
|
2016-08-10 01:40:12 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "python_include_dir",
|
|
|
|
value = default_python_include_dir,
|
|
|
|
description = "Python (2.x or 3.x) include directory"
|
|
|
|
}
|
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "python_lib_dir",
|
|
|
|
value = default_python_lib_dir,
|
|
|
|
description = "Python (2.x or 3.x) library directory "
|
|
|
|
}
|
2016-04-30 18:18:54 +00:00
|
|
|
|
2016-08-10 01:40:12 +00:00
|
|
|
|
2015-12-04 02:58:10 +00:00
|
|
|
newoption {
|
2015-12-04 06:00:52 +00:00
|
|
|
trigger = "targetdir",
|
|
|
|
value = "path such as ../bin",
|
|
|
|
description = "Set the output location for the generated project files"
|
|
|
|
}
|
2015-12-04 02:58:10 +00:00
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "no-test",
|
|
|
|
description = "Disable all tests"
|
|
|
|
}
|
|
|
|
|
2014-04-28 18:11:45 +00:00
|
|
|
newoption
|
|
|
|
{
|
2015-12-04 02:58:10 +00:00
|
|
|
trigger = "no-gtest",
|
2014-08-12 19:18:32 +00:00
|
|
|
description = "Disable unit tests using gtest"
|
2014-05-14 04:52:46 +00:00
|
|
|
}
|
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "no-bullet3",
|
|
|
|
description = "Do not build bullet3 libs"
|
|
|
|
}
|
2015-12-04 02:58:10 +00:00
|
|
|
|
2016-05-27 02:22:26 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "double",
|
|
|
|
description = "Double precision version of Bullet"
|
|
|
|
}
|
|
|
|
|
2017-05-01 22:04:00 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "serial",
|
|
|
|
description = "Enable serial, for testing the VR glove in C++"
|
|
|
|
}
|
|
|
|
|
2017-04-14 19:22:38 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "audio",
|
|
|
|
description = "Enable audio"
|
|
|
|
}
|
2018-03-17 06:42:43 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "enable_multithreading",
|
|
|
|
description = "enable CPU multithreading for bullet2 libs"
|
|
|
|
}
|
|
|
|
if _OPTIONS["enable_multithreading"] then
|
|
|
|
defines {"BT_THREADSAFE=1"}
|
|
|
|
end
|
2016-05-27 02:22:26 +00:00
|
|
|
if _OPTIONS["double"] then
|
|
|
|
defines {"BT_USE_DOUBLE_PRECISION"}
|
|
|
|
end
|
|
|
|
|
2013-03-11 21:03:27 +00:00
|
|
|
configurations {"Release", "Debug"}
|
|
|
|
configuration "Release"
|
2013-07-30 19:37:16 +00:00
|
|
|
flags { "Optimize", "EnableSSE2","StaticRuntime", "NoMinimalRebuild", "FloatFast"}
|
2013-03-11 21:03:27 +00:00
|
|
|
configuration "Debug"
|
|
|
|
defines {"_DEBUG=1"}
|
|
|
|
flags { "Symbols", "StaticRuntime" , "NoMinimalRebuild", "NoEditAndContinue" ,"FloatFast"}
|
2015-12-04 02:58:10 +00:00
|
|
|
|
2015-05-29 22:04:05 +00:00
|
|
|
if os.is("Linux") or os.is("macosx") then
|
2013-03-14 00:38:16 +00:00
|
|
|
if os.is64bit() then
|
|
|
|
platforms {"x64"}
|
|
|
|
else
|
|
|
|
platforms {"x32"}
|
|
|
|
end
|
|
|
|
else
|
2016-08-13 19:21:18 +00:00
|
|
|
platforms {"x32","x64"}
|
2013-03-14 00:38:16 +00:00
|
|
|
end
|
2013-03-11 21:03:27 +00:00
|
|
|
|
|
|
|
configuration {"x32"}
|
|
|
|
targetsuffix ("_" .. act)
|
2014-05-14 04:52:46 +00:00
|
|
|
configuration "x64"
|
2013-03-11 21:03:27 +00:00
|
|
|
targetsuffix ("_" .. act .. "_64" )
|
|
|
|
configuration {"x64", "debug"}
|
|
|
|
targetsuffix ("_" .. act .. "_x64_debug")
|
|
|
|
configuration {"x64", "release"}
|
|
|
|
targetsuffix ("_" .. act .. "_x64_release" )
|
|
|
|
configuration {"x32", "debug"}
|
|
|
|
targetsuffix ("_" .. act .. "_debug" )
|
2014-05-14 04:52:46 +00:00
|
|
|
|
2013-03-11 21:03:27 +00:00
|
|
|
configuration{}
|
|
|
|
|
|
|
|
postfix=""
|
|
|
|
|
|
|
|
if _ACTION == "xcode4" then
|
2015-12-04 06:00:52 +00:00
|
|
|
if _OPTIONS["ios"] then
|
|
|
|
_OPTIONS["no-bullet3"] = "1"
|
|
|
|
_OPTIONS["no-gtest"] = "1"
|
|
|
|
|
|
|
|
postfix = "ios";
|
|
|
|
xcodebuildsettings
|
|
|
|
{
|
|
|
|
'INFOPLIST_FILE = "../../test/Bullet2/Info.plist"',
|
|
|
|
'CODE_SIGN_IDENTITY = "iPhone Developer"',
|
|
|
|
"SDKROOT = iphoneos",
|
|
|
|
'ARCHS = "armv7"',
|
|
|
|
'TARGETED_DEVICE_FAMILY = "1,2"',
|
|
|
|
'VALID_ARCHS = "armv7"',
|
|
|
|
}
|
2015-12-04 02:58:10 +00:00
|
|
|
else
|
2013-11-26 05:38:44 +00:00
|
|
|
xcodebuildsettings
|
|
|
|
{
|
2015-12-04 06:00:52 +00:00
|
|
|
'ARCHS = "$(ARCHS_STANDARD_32_BIT) $(ARCHS_STANDARD_64_BIT)"',
|
|
|
|
'VALID_ARCHS = "x86_64 i386"',
|
2015-11-08 21:49:37 +00:00
|
|
|
-- 'SDKROOT = "macosx10.9"',
|
2013-11-26 05:38:44 +00:00
|
|
|
}
|
2015-12-04 02:58:10 +00:00
|
|
|
end
|
2013-03-11 21:03:27 +00:00
|
|
|
end
|
|
|
|
|
2014-07-31 20:38:31 +00:00
|
|
|
-- comment-out for now, URDF reader needs exceptions
|
|
|
|
-- flags { "NoRTTI", "NoExceptions"}
|
|
|
|
-- defines { "_HAS_EXCEPTIONS=0" }
|
2015-07-15 19:57:45 +00:00
|
|
|
--printf ( _OPTIONS["targetdir"] )
|
|
|
|
|
|
|
|
targetdir( _OPTIONS["targetdir"] or "../bin" )
|
2013-03-11 21:03:27 +00:00
|
|
|
location("./" .. act .. postfix)
|
|
|
|
|
2018-09-06 00:58:14 +00:00
|
|
|
|
2017-09-20 04:10:54 +00:00
|
|
|
|
2016-08-10 01:40:12 +00:00
|
|
|
if not _OPTIONS["python_include_dir"] then
|
|
|
|
_OPTIONS["python_include_dir"] = default_python_include_dir
|
|
|
|
end
|
|
|
|
|
|
|
|
if not _OPTIONS["python_lib_dir"] then
|
|
|
|
_OPTIONS["python_lib_dir"] = default_python_lib_dir
|
|
|
|
end
|
2017-09-20 15:12:59 +00:00
|
|
|
|
|
|
|
if os.is("Linux") then
|
|
|
|
default_glfw_include_dir = "usr/local/include/GLFW"
|
|
|
|
default_glfw_lib_dir = "/usr/local/lib/"
|
|
|
|
default_glfw_lib_name = "glfw3"
|
|
|
|
end
|
|
|
|
|
|
|
|
if os.is("macosx") then
|
|
|
|
default_glfw_include_dir = "/usr/local/Cellar/glfw/3.2.1/include"
|
|
|
|
default_glfw_lib_dir = "/usr/local/Cellar/glfw/3.2.1/lib"
|
|
|
|
default_glfw_lib_name = "glfw"
|
|
|
|
end
|
|
|
|
|
|
|
|
if os.is("Windows") then
|
2017-09-20 15:18:42 +00:00
|
|
|
default_glfw_include_dir = "c:/glfw/include"
|
|
|
|
default_glfw_lib_dir = "c:/glfw/lib"
|
2017-09-20 15:12:59 +00:00
|
|
|
default_glfw_lib_name = "glfw3"
|
|
|
|
end
|
|
|
|
|
2018-09-04 21:49:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-20 15:12:59 +00:00
|
|
|
if not _OPTIONS["glfw_lib_dir"] then
|
|
|
|
_OPTIONS["glfw_lib_dir"] = default_glfw_lib_dir
|
|
|
|
end
|
|
|
|
if not _OPTIONS["glfw_include_dir"] then
|
|
|
|
_OPTIONS["glfw_include_dir"] = default_glfw_include_dir
|
|
|
|
end
|
|
|
|
if not _OPTIONS["glfw_lib_name"] then
|
|
|
|
_OPTIONS["glfw_lib_name"] = default_glfw_lib_name
|
|
|
|
end
|
2017-10-25 17:00:45 +00:00
|
|
|
|
2017-11-23 02:12:02 +00:00
|
|
|
|
2017-10-25 17:00:45 +00:00
|
|
|
|
2017-09-20 04:10:54 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "glfw_include_dir",
|
|
|
|
value = default_glfw_include_dir,
|
|
|
|
description = "GLFW 3.x include directory"
|
|
|
|
}
|
2017-09-20 15:12:59 +00:00
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "glfw_lib_name",
|
|
|
|
value = default_glfw_lib_name,
|
|
|
|
description = "GLFW 3.x library name (glfw, glfw3)"
|
|
|
|
}
|
|
|
|
|
2017-09-20 04:10:54 +00:00
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "glfw_lib_dir",
|
|
|
|
value = default_glfw_lib_dir,
|
|
|
|
description = "(optional) GLFW 3.x library directory "
|
|
|
|
}
|
|
|
|
|
|
|
|
newoption
|
|
|
|
{
|
|
|
|
trigger = "enable_glfw",
|
|
|
|
value = false,
|
|
|
|
description = "(optional) use GLFW 3.x library"
|
|
|
|
}
|
|
|
|
|
|
|
|
if _OPTIONS["enable_glfw"] then
|
|
|
|
defines {"B3_USE_GLFW"}
|
|
|
|
|
|
|
|
function initOpenGL()
|
|
|
|
includedirs {
|
|
|
|
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
|
|
|
}
|
|
|
|
|
|
|
|
includedirs {
|
|
|
|
_OPTIONS["glfw_include_dir"],
|
|
|
|
}
|
|
|
|
|
|
|
|
libdirs {
|
|
|
|
_OPTIONS["glfw_lib_dir"]
|
|
|
|
}
|
2017-09-20 15:12:59 +00:00
|
|
|
links { _OPTIONS["glfw_lib_name"]}
|
2017-09-20 04:10:54 +00:00
|
|
|
files { projectRootDir .. "examples/ThirdPartyLibs/glad/glad.c" }
|
|
|
|
end
|
|
|
|
function findOpenGL3()
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
function initGlew()
|
|
|
|
end
|
2018-02-21 00:21:22 +00:00
|
|
|
function initX11()
|
|
|
|
links {"X11", "dl","pthread"}
|
|
|
|
|
|
|
|
end
|
2017-09-20 04:10:54 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
dofile ("findOpenGLGlewGlut.lua")
|
|
|
|
if (not findOpenGL3()) then
|
|
|
|
defines {"NO_OPENGL3"}
|
|
|
|
end
|
|
|
|
end
|
2014-05-14 04:52:46 +00:00
|
|
|
|
2017-09-20 04:10:54 +00:00
|
|
|
|
2013-03-11 21:03:27 +00:00
|
|
|
|
|
|
|
dofile ("findOpenCL.lua")
|
|
|
|
dofile ("findDirectX11.lua")
|
2017-09-20 04:10:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 21:03:27 +00:00
|
|
|
language "C++"
|
2014-04-28 18:11:45 +00:00
|
|
|
|
2016-11-17 00:12:59 +00:00
|
|
|
|
2017-09-20 04:10:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-14 19:22:38 +00:00
|
|
|
if _OPTIONS["audio"] then
|
|
|
|
include "../examples/TinyAudio"
|
|
|
|
end
|
|
|
|
|
2017-05-01 22:04:00 +00:00
|
|
|
if _OPTIONS["serial"] then
|
|
|
|
include "../examples/ThirdPartyLibs/serial"
|
|
|
|
end
|
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
if not _OPTIONS["no-demos"] then
|
|
|
|
include "../examples/ExampleBrowser"
|
2017-02-24 23:34:11 +00:00
|
|
|
include "../examples/RobotSimulator"
|
2015-12-04 06:00:52 +00:00
|
|
|
include "../examples/OpenGLWindow"
|
|
|
|
include "../examples/ThirdPartyLibs/Gwen"
|
|
|
|
include "../examples/HelloWorld"
|
|
|
|
include "../examples/SharedMemory"
|
2016-09-08 22:15:58 +00:00
|
|
|
include "../examples/ThirdPartyLibs/BussIK"
|
2015-12-04 06:00:52 +00:00
|
|
|
|
|
|
|
if _OPTIONS["lua"] then
|
|
|
|
include "../examples/ThirdPartyLibs/lua-5.2.3"
|
|
|
|
end
|
2016-08-10 01:40:12 +00:00
|
|
|
if _OPTIONS["enable_pybullet"] then
|
2016-04-30 18:18:54 +00:00
|
|
|
include "../examples/pybullet"
|
|
|
|
end
|
2017-04-12 03:16:49 +00:00
|
|
|
include "../examples/SimpleOpenGL3"
|
2015-12-04 06:00:52 +00:00
|
|
|
|
2017-02-22 14:13:32 +00:00
|
|
|
if _OPTIONS["standalone-examples"] then
|
2017-04-12 03:16:49 +00:00
|
|
|
|
2017-02-22 14:13:32 +00:00
|
|
|
include "../examples/TinyRenderer"
|
|
|
|
include "../examples/BasicDemo"
|
|
|
|
include "../examples/InverseDynamics"
|
|
|
|
include "../examples/ExtendedTutorials"
|
|
|
|
include "../examples/MultiThreading"
|
|
|
|
end
|
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
if not _OPTIONS["no-test"] then
|
|
|
|
include "../test/SharedMemory"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-11-17 00:12:59 +00:00
|
|
|
if _OPTIONS["midi"] then
|
|
|
|
include "../examples/ThirdPartyLibs/midi"
|
|
|
|
end
|
|
|
|
|
2017-02-19 20:08:58 +00:00
|
|
|
if not _OPTIONS["no-clsocket"] then
|
2017-02-19 19:48:01 +00:00
|
|
|
defines {"BT_ENABLE_CLSOCKET"}
|
2017-02-19 20:08:58 +00:00
|
|
|
include "../examples/ThirdPartyLibs/clsocket"
|
|
|
|
include "../test/clsocket"
|
2017-02-19 19:48:01 +00:00
|
|
|
end
|
|
|
|
|
2016-11-04 20:15:10 +00:00
|
|
|
if not _OPTIONS["no-enet"] then
|
2017-02-19 20:08:58 +00:00
|
|
|
defines {"BT_ENABLE_ENET"}
|
|
|
|
|
2016-11-04 20:15:10 +00:00
|
|
|
include "../examples/ThirdPartyLibs/enet"
|
|
|
|
include "../test/enet/nat_punchthrough/client"
|
|
|
|
include "../test/enet/nat_punchthrough/server"
|
|
|
|
include "../test/enet/chat/client"
|
|
|
|
include "../test/enet/chat/server"
|
|
|
|
end
|
|
|
|
|
2016-04-14 15:51:20 +00:00
|
|
|
if _OPTIONS["no-bullet3"] then
|
|
|
|
print "--no-bullet3 implies --no-demos"
|
|
|
|
_OPTIONS["no-demos"] = "1"
|
|
|
|
else
|
|
|
|
include "../src/Bullet3Common"
|
|
|
|
include "../src/Bullet3Geometry"
|
|
|
|
include "../src/Bullet3Collision"
|
|
|
|
include "../src/Bullet3Dynamics"
|
|
|
|
include "../src/Bullet3OpenCL"
|
|
|
|
include "../src/Bullet3Serialize/Bullet2FileLoader"
|
|
|
|
end
|
|
|
|
|
|
|
|
if _OPTIONS["no-extras"] then
|
|
|
|
print "--no-extras implies --no-demos"
|
|
|
|
_OPTIONS["no-demos"] = "1"
|
|
|
|
else
|
|
|
|
include "../Extras"
|
|
|
|
end
|
|
|
|
|
2015-12-04 06:00:52 +00:00
|
|
|
if not _OPTIONS["no-test"] then
|
|
|
|
include "../test/Bullet2"
|
|
|
|
|
|
|
|
if not _OPTIONS["no-gtest"] then
|
|
|
|
include "../test/gtest-1.7.0"
|
|
|
|
-- include "../test/hello_gtest"
|
|
|
|
include "../test/collision"
|
2016-01-07 02:08:49 +00:00
|
|
|
include "../test/BulletDynamics/pendulum"
|
2015-12-04 06:00:52 +00:00
|
|
|
if not _OPTIONS["no-bullet3"] then
|
|
|
|
if not _OPTIONS["no-extras"] then
|
|
|
|
include "../test/InverseDynamics"
|
|
|
|
end
|
|
|
|
include "../test/TestBullet3OpenCL"
|
|
|
|
end
|
|
|
|
if not _OPTIONS["no-demos"] then
|
|
|
|
-- Gwen is only used for demos
|
|
|
|
include "../test/GwenOpenGLTest"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-05-12 16:17:27 +00:00
|
|
|
|
2015-11-17 16:26:27 +00:00
|
|
|
include "../src/BulletInverseDynamics"
|
2015-05-12 16:17:27 +00:00
|
|
|
include "../src/BulletSoftBody"
|
2015-12-04 06:00:52 +00:00
|
|
|
include "../src/BulletDynamics"
|
|
|
|
include "../src/BulletCollision"
|
|
|
|
include "../src/LinearMath"
|
2015-12-04 02:58:10 +00:00
|
|
|
|