meson: Migrate nv2a_vsh_cpu submodule to a subproject

This commit is contained in:
Matt Borgerson 2024-12-31 16:04:27 -07:00 committed by mborgerson
parent 0554095dcd
commit 824af3978f
9 changed files with 25 additions and 23 deletions

3
.gitmodules vendored
View File

@ -82,9 +82,6 @@
[submodule "tomlplusplus"]
path = tomlplusplus
url = https://github.com/marzer/tomlplusplus
[submodule "hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu"]
path = hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu
url = https://github.com/abaire/nv2a_vsh_cpu.git
[submodule "ui/thirdparty/httplib"]
path = ui/thirdparty/httplib
url = https://github.com/yhirose/cpp-httplib

2
configure vendored
View File

@ -237,7 +237,7 @@ else
git_submodules_action="ignore"
fi
git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu"
git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig"
git="git"
# Don't accept a target_list environment variable.

View File

@ -1,15 +1,15 @@
nv2a_vsh_cpu_files = files(
'nv2a_vsh_cpu/src/nv2a_vsh_cpu.c',
'nv2a_vsh_cpu/src/nv2a_vsh_disassembler.c',
'nv2a_vsh_cpu/src/nv2a_vsh_emulator.c',
'nv2a_vsh_cpu/src/nv2a_vsh_emulator_execution_state.c',
)
libnv2a_vsh_cpu = static_library('nv2a_vsh_cpu',
sources: nv2a_vsh_cpu_files,
include_directories: ['.', 'nv2a_vsh_cpu/src'])
nv2a_vsh_cpu = declare_dependency(link_with: libnv2a_vsh_cpu,
include_directories: ['nv2a_vsh_cpu/src'])
nv2a_vsh_cpu_opts = cmake.subproject_options()
nv2a_vsh_cpu_opts.add_cmake_defines({
'CMAKE_OSX_ARCHITECTURES': cmake_macos_arch,
'nv2a_vsh_cpu_UNIT_TEST': 'OFF',
})
nv2a_vsh_cpu_subproj = cmake.subproject('nv2a_vsh_cpu', options: nv2a_vsh_cpu_opts)
nv2a_vsh_cpu = declare_dependency(include_directories: nv2a_vsh_cpu_subproj.include_directories('nv2a_vsh_emulator'),
link_with: [
nv2a_vsh_cpu_subproj.target('nv2a_vsh_emulator'),
nv2a_vsh_cpu_subproj.target('nv2a_vsh_cpu'),
nv2a_vsh_cpu_subproj.target('nv2a_vsh_disassembler'),
])
libgloffscreen = static_library('libgloffscreen',
sources: files('gloffscreen/common.c', 'gloffscreen/sdl.c'),

@ -1 +0,0 @@
Subproject commit d5a7308809a80e1b01b5c016127d4f1b91c8673b

View File

@ -82,6 +82,7 @@ have_block = have_system or have_tools
python = import('python').find_installation()
cmake = import('cmake')
cmake_macos_arch = host_machine.cpu() == 'aarch64' ? 'arm64' : host_machine.cpu()
if cpu not in supported_cpus
host_arch = 'unknown'
@ -391,7 +392,8 @@ have_vhost_net = have_vhost_net_kernel or have_vhost_net_user or have_vhost_net_
libm = cc.find_library('m', required: false)
if targetos == 'windows'
threads = dependency('', required: false)
threads = declare_dependency()
meson.override_dependency('threads', threads)
else
threads = dependency('threads')
endif

View File

@ -31,9 +31,8 @@ submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloa
# xemu extras
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig"
submodules="$submodules hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu"
subprojects="glslang SPIRV-Reflect volk VulkanMemoryAllocator"
subprojects="glslang SPIRV-Reflect volk VulkanMemoryAllocator nv2a_vsh_cpu"
sub_deinit=""

View File

@ -233,10 +233,10 @@ Lib('fpng', 'https://github.com/richgel999/fpng',
version='6926f5a0a78f22d42b074a0ab8032e07736babd4'
),
Lib('nv2a_vsh_cpu', 'https://github.com/abaire/nv2a_vsh_cpu',
unlicense, 'https://raw.githubusercontent.com/abaire/nv2a_vsh_cpu/main/LICENSE',
Lib('nv2a_vsh_cpu', 'https://github.com/xemu-project/nv2a_vsh_cpu',
unlicense, 'https://raw.githubusercontent.com/xemu-project/nv2a_vsh_cpu/main/LICENSE',
ships_static=all_platforms,
submodule=Submodule('hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu')
submodule=Submodule('subprojects/nv2a_vsh_cpu.wrap')
),
Lib('volk', 'https://github.com/zeux/volk',

View File

@ -2,3 +2,4 @@ glslang
SPIRV-Reflect
volk
VulkanMemoryAllocator
nv2a_vsh_cpu

View File

@ -0,0 +1,4 @@
[wrap-git]
url=https://github.com/xemu-project/nv2a_vsh_cpu
revision=d5a7308809a80e1b01b5c016127d4f1b91c8673b
depth=1