summaryrefslogtreecommitdiff
path: root/modules/ogg
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-10-16 11:52:09 +0200
committerGitHub <noreply@github.com>2016-10-16 11:52:09 +0200
commit89132224a651c0e0d4121270f63decb9a678ff88 (patch)
tree224a008705391b6e5b560d2c0426380651756383 /modules/ogg
parenteb8d19ba740c11acf0f26080405fc5cd827a2d41 (diff)
parente57042e8a93e4f3d65cc91633f5af0daedf69a2a (diff)
Merge pull request #6830 from akien-mga/thirdparty
Move most "drivers" as toggleable "modules" and split their thirdparty libraries in an own tree
Diffstat (limited to 'modules/ogg')
-rw-r--r--modules/ogg/SCsub19
-rw-r--r--modules/ogg/config.py6
-rw-r--r--modules/ogg/register_types.cpp35
-rw-r--r--modules/ogg/register_types.h30
4 files changed, 90 insertions, 0 deletions
diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub
new file mode 100644
index 0000000000..fd5ddf55c8
--- /dev/null
+++ b/modules/ogg/SCsub
@@ -0,0 +1,19 @@
+Import('env')
+Import('env_modules')
+
+env_ogg = env_modules.Clone()
+
+# Thirdparty source files
+if (env["libogg"] != "system"): # builtin
+ thirdparty_dir = "#thirdparty/libogg/"
+ thirdparty_sources = [
+ "bitwise.c",
+ "framing.c",
+ ]
+ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
+
+ env_ogg.add_source_files(env.modules_sources, thirdparty_sources)
+ env_ogg.Append(CPPPATH = [thirdparty_dir])
+
+# Godot source files
+env_ogg.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/ogg/config.py b/modules/ogg/config.py
new file mode 100644
index 0000000000..368e97e152
--- /dev/null
+++ b/modules/ogg/config.py
@@ -0,0 +1,6 @@
+
+def can_build(platform):
+ return True
+
+def configure(env):
+ pass
diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp
new file mode 100644
index 0000000000..823ca510ca
--- /dev/null
+++ b/modules/ogg/register_types.cpp
@@ -0,0 +1,35 @@
+/*************************************************************************/
+/* register_types.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "register_types.h"
+
+// Dummy module as libogg is needed by other modules (vorbis, theora, opus, ...)
+
+void register_ogg_types() {}
+
+void unregister_ogg_types() {}
diff --git a/modules/ogg/register_types.h b/modules/ogg/register_types.h
new file mode 100644
index 0000000000..b5268a1df4
--- /dev/null
+++ b/modules/ogg/register_types.h
@@ -0,0 +1,30 @@
+/*************************************************************************/
+/* register_types.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+void register_ogg_types();
+void unregister_ogg_types();