From 7edd8bbc87938c7890829bd5a168320cff35d4d8 Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Sun, 5 Nov 2023 14:56:37 -0800 Subject: [PATCH] Add vgmstream dependency --- .gitmodules | 3 +++ meson.build | 7 +++++++ meson_options.txt | 3 ++- subprojects/vgmstream | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) create mode 160000 subprojects/vgmstream diff --git a/.gitmodules b/.gitmodules index b9d247f..dc90f7e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "subprojects/jsoncpp"] path = subprojects/jsoncpp url = https://github.com/open-source-parsers/jsoncpp +[submodule "subprojects/vgmstream"] + path = subprojects/vgmstream + url = https://github.com/vgmstream/vgmstream.git diff --git a/meson.build b/meson.build index 3c090d7..6da14fc 100644 --- a/meson.build +++ b/meson.build @@ -32,6 +32,13 @@ deps = [ smx_subproj.dependency('SDL2_mixer_ext_Static') ] +if get_option('vgmstream') + vgm_opts = cmake.subproject_options() + vgm_opts.add_cmake_defines({'BUILD_FB2K': false, 'BUILD_CLI': false, 'BUILD_WINAMP': false, 'BUILD_XMPLAY': false, 'BUILD_AUDACIOUS': false, 'BUILD_V123': false, 'BUILD_STATIC': false}) + #vgm_opts.set_override_option('c_std', 'c99') + vgm_subproj = cmake.subproject('vgmstream', options: vgm_opts) + deps += vgm_subproj.dependency('libvgmstream') +endif git = find_program('git', required: false) tag = 'unknown' if git.found() diff --git a/meson_options.txt b/meson_options.txt index 3f5dc06..5376e98 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,3 @@ option('gles', type: 'boolean', value: false) -option('portals', type: 'boolean', value: true) \ No newline at end of file +option('portals', type: 'boolean', value: true) +option('vgmstream', type: 'boolean', value: true) \ No newline at end of file diff --git a/subprojects/vgmstream b/subprojects/vgmstream new file mode 160000 index 0000000..416ac26 --- /dev/null +++ b/subprojects/vgmstream @@ -0,0 +1 @@ +Subproject commit 416ac26510b4e243760d9c3a1fdb81a885762a8b