summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-10-12 20:37:38 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-10-15 11:50:40 +0200
commitd9a291f6411f2e571c181da0ac89f550ba73f681 (patch)
treea560b8263d9ab896a05087eb20d5eeefdeb89969 /platform
parentee3cf211c6fd4d1e30617467cdbbe945798a68b3 (diff)
ogg/vorbis/opus: Make them modules and unbundle thirdparty libs
Took the opportunity to undo the Godot changed made to the opus source. The opus module should eventually be built in its own environment to avoid polluting others with too many include dirs and defines. TODO: Fix the platform/ stuff for opus.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/detect.py3
-rw-r--r--platform/iphone/detect.py3
-rw-r--r--platform/javascript/detect.py5
-rw-r--r--platform/x11/detect.py11
4 files changed, 18 insertions, 4 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 8e9a58da19..9087d5343e 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -203,7 +203,8 @@ def configure(env):
env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED', '-DNO_FCNTL','-DMPC_FIXED_POINT'])
# env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED','-DMPC_FIXED_POINT'])
- if(env["opus"]=="yes"):
+ # TODO: Move that to opus module's config
+ if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"):
if (env["android_arch"]=="armv6" or env["android_arch"]=="armv7"):
env.Append(CFLAGS=["-DOPUS_ARM_OPT"])
env.opus_fixed_point="yes"
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index 9cb52d4561..3de0ba0db9 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -165,7 +165,8 @@ def configure(env):
env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate'
env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DMPC_FIXED_POINT'])
- if(env["opus"]=="yes"):
+ # TODO: Move that to opus module's config
+ if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"):
env.opus_fixed_point="yes"
if env["arch"]=="x86":
pass
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 0f1fd23177..f80c3b4915 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -70,8 +70,9 @@ def configure(env):
#env.Append(CCFLAGS=['-D_DEBUG', '-Wall', '-g4', '-DDEBUG_ENABLED'])
env.Append(CPPFLAGS=['-DDEBUG_MEMORY_ALLOC'])
- if(env["opus"]=="yes"):
- env.opus_fixed_point="yes"
+ # TODO: Move that to opus module's config
+ if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"):
+ env.opus_fixed_point = "yes"
env.Append(CPPFLAGS=["-fno-exceptions",'-DNO_SAFE_CAST','-fno-rtti'])
env.Append(CPPFLAGS=['-DJAVASCRIPT_ENABLED', '-DUNIX_ENABLED', '-DPTHREAD_NO_RENAME', '-DNO_FCNTL','-DMPC_FIXED_POINT','-DTYPED_METHOD_BIND','-DNO_THREADS'])
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 6a5ca84cbe..8a156a6bce 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -155,6 +155,17 @@ def configure(env):
if (env["enet"] == "system"):
env.ParseConfig('pkg-config libenet --cflags --libs')
+ if (env["libogg"] == "system"):
+ env.ParseConfig('pkg-config ogg --cflags --libs')
+
+ if (env["libvorbis"] == "system"):
+ env["libogg"] = "system" # Needed to link against system libvorbis
+ env.ParseConfig('pkg-config vorbis vorbisfile ogg --cflags --libs')
+
+ if (env["opus"] == "system"):
+ env["libogg"] = "system" # Needed to link against system opus
+ env.ParseConfig('pkg-config opus opusfile ogg --cflags --libs')
+
env.Append(CPPFLAGS=['-DOPENGL_ENABLED'])