-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmeson.build
More file actions
32 lines (24 loc) · 699 Bytes
/
meson.build
File metadata and controls
32 lines (24 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
project('VulkanCompute', 'c', default_options : ['c_std=c99'])
vlk_dep = dependency('Vulkan')
src = ['main.c',
'compute.c',
'instance.c',
'device.c',
'pipeline.c',
'memory.c']
executable('VulkanCompute', src, dependencies : vlk_dep)
compiler = meson.get_compiler('c')
if compiler.get_id() == 'gcc'
message('Compiler: GCC')
elif compiler.get_id() == 'clang'
message('Compiler: LLVM/clang')
endif
# Compile shaders
cs = run_command('glslangValidator', '-V', 'shader.comp', '-o', './build/shader.spv')
if cs.returncode() != 0
message('Could not comile shaders')
endif
output = cs.stdout().strip()
message(output)
errortxt = cs.stderr().strip()
message(errortxt)