mirror of https://github.com/xemu-project/xemu.git
meson: Move volk, SPIRV-Reflect to main meson.build
This commit is contained in:
parent
209c0991a1
commit
f92713def7
42
meson.build
42
meson.build
|
@ -1197,19 +1197,37 @@ elif targetos == 'linux'
|
||||||
vulkan = dependency('vulkan')
|
vulkan = dependency('vulkan')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if vulkan.found() and not libglslang.found()
|
if vulkan.found()
|
||||||
cmake = import('cmake')
|
cmake = import('cmake')
|
||||||
# FIXME: Get spirv-tools to enable opt.
|
|
||||||
glslang_opts = cmake.subproject_options()
|
if not libglslang.found()
|
||||||
glslang_opts.add_cmake_defines({'ENABLE_OPT': false})
|
# FIXME: Get spirv-tools to enable opt.
|
||||||
glslang_subpro = cmake.subproject('glslang', options: glslang_opts)
|
glslang_opts = cmake.subproject_options()
|
||||||
libglslang = declare_dependency(link_with: [
|
glslang_opts.add_cmake_defines({'ENABLE_OPT': false})
|
||||||
glslang_subpro.target('glslang'),
|
glslang_subpro = cmake.subproject('glslang', options: glslang_opts)
|
||||||
glslang_subpro.target('MachineIndependent'),
|
libglslang = declare_dependency(link_with: [
|
||||||
glslang_subpro.target('GenericCodeGen'),
|
glslang_subpro.target('glslang'),
|
||||||
glslang_subpro.target('SPIRV'),
|
glslang_subpro.target('MachineIndependent'),
|
||||||
], include_directories: ['subprojects' / 'glslang']
|
glslang_subpro.target('GenericCodeGen'),
|
||||||
)
|
glslang_subpro.target('SPIRV'),
|
||||||
|
], include_directories: ['subprojects' / 'glslang']
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
|
volk_opts = cmake.subproject_options()
|
||||||
|
volk_opts.add_cmake_defines({'VOLK_STATIC_DEFINES': 'VK_NO_PROTOTYPES'})
|
||||||
|
volk_subproj = cmake.subproject('volk', options: volk_opts)
|
||||||
|
volk = declare_dependency(compile_args: ['-DVK_NO_PROTOTYPES'],
|
||||||
|
include_directories: volk_subproj.include_directories('volk'),
|
||||||
|
link_with: volk_subproj.target('volk'),
|
||||||
|
dependencies: vulkan)
|
||||||
|
|
||||||
|
spirv_reflect_opts = cmake.subproject_options()
|
||||||
|
spirv_reflect_opts.add_cmake_defines({'SPIRV_REFLECT_STATIC_LIB': 'ON'})
|
||||||
|
spirv_reflect_subproj = cmake.subproject('SPIRV-Reflect', options: spirv_reflect_opts)
|
||||||
|
spirv_reflect = declare_dependency(include_directories: spirv_reflect_subproj.include_directories('spirv-reflect-static'),
|
||||||
|
link_with: spirv_reflect_subproj.target('spirv-reflect-static'),
|
||||||
|
dependencies: vulkan)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
subdir('thirdparty')
|
subdir('thirdparty')
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
if vulkan.found()
|
if vulkan.found()
|
||||||
|
|
||||||
volk_opts = cmake.subproject_options()
|
|
||||||
volk_opts.add_cmake_defines({'VOLK_STATIC_DEFINES': 'VK_NO_PROTOTYPES'})
|
|
||||||
volk_subproj = cmake.subproject('volk', options: volk_opts)
|
|
||||||
volk = declare_dependency(compile_args: ['-DVK_NO_PROTOTYPES'],
|
|
||||||
include_directories: volk_subproj.include_directories('volk'),
|
|
||||||
link_with: volk_subproj.target('volk'),
|
|
||||||
dependencies: vulkan)
|
|
||||||
|
|
||||||
debug_vma = false
|
debug_vma = false
|
||||||
|
|
||||||
vma_defns = [
|
vma_defns = [
|
||||||
|
@ -33,11 +25,4 @@ vma = declare_dependency(include_directories: vma_subproj.include_directories('V
|
||||||
link_with: libvma,
|
link_with: libvma,
|
||||||
dependencies: vulkan)
|
dependencies: vulkan)
|
||||||
|
|
||||||
spirv_reflect_opts = cmake.subproject_options()
|
|
||||||
spirv_reflect_opts.add_cmake_defines({'SPIRV_REFLECT_STATIC_LIB': 'ON'})
|
|
||||||
spirv_reflect_subproj = cmake.subproject('SPIRV-Reflect', options: spirv_reflect_opts)
|
|
||||||
spirv_reflect = declare_dependency(include_directories: spirv_reflect_subproj.include_directories('spirv-reflect-static'),
|
|
||||||
link_with: spirv_reflect_subproj.target('spirv-reflect-static'),
|
|
||||||
dependencies: vulkan)
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue