summaryrefslogtreecommitdiff
path: root/modules/minimp3/SCsub
diff options
context:
space:
mode:
authorVincent <vinsteimes@gmail.com>2020-10-22 02:33:40 +0200
committerVincent <vinsteimes@gmail.com>2020-12-03 17:51:43 +0100
commit704d6de84ce110ec5c7eb32c5968b35d6bdcde39 (patch)
tree7b08959ec949490e47c6d33e77dc978f1e48cb5e /modules/minimp3/SCsub
parentea7dd1be36abc528f39e7c42725267d01774983b (diff)
add mp3 import and playback support
Diffstat (limited to 'modules/minimp3/SCsub')
-rw-r--r--modules/minimp3/SCsub17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/minimp3/SCsub b/modules/minimp3/SCsub
new file mode 100644
index 0000000000..f4d1605d55
--- /dev/null
+++ b/modules/minimp3/SCsub
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+Import("env")
+Import("env_modules")
+
+env_minimp3 = env_modules.Clone()
+
+thirdparty_dir = "#thirdparty/minimp3/"
+
+# Treat minimp3 headers as system headers to avoid raising warnings. Not supported on MSVC.
+if not env.msvc:
+ env_minimp3.Append(CPPFLAGS=["-isystem", Dir(thirdparty_dir).path])
+else:
+ env_minimp3.Prepend(CPPPATH=[thirdparty_dir])
+
+# Godot's own source files
+env_minimp3.add_source_files(env.modules_sources, "*.cpp")