-
Notifications
You must be signed in to change notification settings - Fork 14
/
meson.build
35 lines (27 loc) · 1017 Bytes
/
meson.build
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
33
34
35
project('grvk', 'c', version : '0.5.0', meson_version : '>= 0.46')
cpu_family = target_machine.cpu_family()
grvk_compiler = meson.get_compiler('c')
grvk_c_std = 'c99'
grvk_msvc = grvk_compiler.get_id() == 'msvc'
grvk_include_path = include_directories('.', './include')
grvk_version = vcs_tag(
command: ['git', 'describe', '--tags', '--dirty=+'],
input: 'version.h.in',
output: 'version.h',
)
if grvk_compiler.has_link_argument('-Wl,--file-alignment=4096')
add_global_link_arguments('-Wl,--file-alignment=4096', language: 'c')
endif
if cpu_family == 'x86_64'
dll_variant = '64'
grvk_library_path = meson.source_root() + '/lib'
elif cpu_family == 'x86'
dll_variant = '32'
grvk_library_path = meson.source_root() + '/lib32'
if grvk_compiler.has_link_argument('-Wl,--enable-stdcall-fixup')
add_global_link_arguments('-Wl,--enable-stdcall-fixup', language: 'c')
endif
endif
lib_vulkan = grvk_compiler.find_library('vulkan-1', dirs : grvk_library_path)
subdir('src')
subdir('test')