diff options
Diffstat (limited to 'platform/server/detect.py')
-rw-r--r-- | platform/server/detect.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/platform/server/detect.py b/platform/server/detect.py index 72c9c770e3..43aad4ad26 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -12,9 +12,6 @@ def get_name(): def can_build(): - # Doesn't build against Godot 3.0 for now, disable to avoid confusing users - return False - if (os.name != "posix" or sys.platform == "darwin"): return False @@ -25,12 +22,14 @@ def get_opts(): from SCons.Variables import BoolVariable return [ BoolVariable('use_llvm', 'Use the LLVM compiler', False), + BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False), ] def get_flags(): return [ + ("module_mobile_vr_enabled", False), ] @@ -67,9 +66,6 @@ def configure(env): # FIXME: Check for existence of the libs before parsing their flags with pkg-config - if not env['builtin_openssl']: - env.ParseConfig('pkg-config openssl --cflags --libs') - if not env['builtin_libwebp']: env.ParseConfig('pkg-config libwebp --cflags --libs') @@ -86,6 +82,16 @@ def configure(env): if not env['builtin_libpng']: env.ParseConfig('pkg-config libpng --cflags --libs') + if not env['builtin_bullet']: + # We need at least version 2.88 + import subprocess + bullet_version = subprocess.check_output(['pkg-config', 'bullet', '--modversion']).strip() + if bullet_version < "2.88": + # Abort as system bullet was requested but too old + print("Bullet: System version {0} does not match minimal requirements ({1}). Aborting.".format(bullet_version, "2.88")) + sys.exit(255) + env.ParseConfig('pkg-config bullet --cflags --libs') + if not env['builtin_enet']: env.ParseConfig('pkg-config libenet --cflags --libs') @@ -126,3 +132,8 @@ def configure(env): env.Append(CPPPATH=['#platform/server']) env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED']) env.Append(LIBS=['pthread']) + env.Append(LIBS=['dl']) + + # Link those statically for portability + if env['use_static_cpp']: + env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++']) |