diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-13 15:16:11 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-13 15:16:22 +0100 |
commit | e141845bfb3e12a9213c8682d5b2589ce5305f70 (patch) | |
tree | 25f7f08bd8e667a023583dfd6d13a9a83e9b8f5c /modules | |
parent | af9c2f8b9c7ab85af386e8482f6e92b20e40905f (diff) |
SCons: Allow unbundling bullet on Linux (only 2.87+)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/bullet/SCsub | 21 | ||||
-rw-r--r-- | modules/enet/SCsub | 4 |
2 files changed, 11 insertions, 14 deletions
diff --git a/modules/bullet/SCsub b/modules/bullet/SCsub index 6b1c38a265..d8d0b930a5 100644 --- a/modules/bullet/SCsub +++ b/modules/bullet/SCsub @@ -3,14 +3,15 @@ Import('env') Import('env_modules') -# build only version 2 -# Bullet 2.87 - env_bullet = env_modules.Clone() -thirdparty_dir = "#thirdparty/bullet/" +# Thirdparty source files + +if env['builtin_bullet']: + # Build only version 2 for now (as of 2.87) + thirdparty_dir = "#thirdparty/bullet/" -bullet2_src = [ + bullet2_src = [ # BulletCollision "BulletCollision/BroadphaseCollision/btAxisSweep3.cpp" , "BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp" @@ -181,14 +182,10 @@ bullet2_src = [ , "LinearMath/btVector3.cpp" ] -bullet_sources = [thirdparty_dir + file for file in bullet2_src] + thirdparty_sources = [thirdparty_dir + file for file in bullet2_src] -# include headers -env_bullet.Append(CPPPATH=[thirdparty_dir]) - -env_bullet.add_source_files(env.modules_sources, bullet_sources) + env_bullet.add_source_files(env.modules_sources, thirdparty_sources) + env_bullet.Append(CPPPATH=[thirdparty_dir]) # Godot source files env_bullet.add_source_files(env.modules_sources, "*.cpp") - -Export('env') diff --git a/modules/enet/SCsub b/modules/enet/SCsub index 4790c5099f..7caeafa1d6 100644 --- a/modules/enet/SCsub +++ b/modules/enet/SCsub @@ -3,10 +3,10 @@ Import('env') Import('env_modules') -# Thirdparty source files - env_enet = env_modules.Clone() +# Thirdparty source files + if env['builtin_enet']: thirdparty_dir = "#thirdparty/enet/" thirdparty_sources = [ |