This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
meson.build
74 lines (61 loc) · 1.44 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
project('vpp', ['c', 'cpp'],
license: 'BSL',
version: '0.3.0',
meson_version: '>=0.46',
default_options: [
'cpp_std=c++17',
'warning_level=3',
])
# options
example_glfw = get_option('example_glfw')
example_ny = get_option('example_ny')
tests = get_option('tests')
one_device = get_option('one_device')
shared = (get_option('default_library') == 'shared')
cc = meson.get_compiler('cpp')
# default arrguments
# warnings and stuff
arguments = [
'-Wno-unused-parameter',
'-Wno-missing-braces',
'-fvisibility=hidden'
]
add_project_arguments(
cc.get_supported_arguments(arguments),
language: 'cpp')
# dependencies
dep_threads = dependency('threads')
dep_dlg = dependency('dlg', fallback: ['dlg', 'dlg_dep'])
dep_vkpp = dependency('vkpp', fallback: ['vkpp', 'vkpp_dep'])
dep_vulkan = dependency('vulkan')
deps = [
dep_threads,
dep_dlg,
dep_vkpp,
dep_vulkan]
vpp_inc = include_directories('include')
vpp_inc_private = include_directories('src')
subdir('include/vpp')
subdir('src/vpp')
# declare dependency
vpp_dep = declare_dependency(
include_directories: vpp_inc,
dependencies: deps,
link_with: vpp_lib)
# examples, test
# must come after dependency
subdir('docs/examples')
if tests
subdir('docs/tests')
endif
# pkgconfig
pkg = import('pkgconfig')
pkg_dirs = ['.']
pkg.generate(
vpp_lib,
name: 'vpp',
requires: ['vulkan'],
filebase: 'vpp',
subdirs: pkg_dirs,
version: meson.project_version(),
description: 'Vulkan utility library')