-
Notifications
You must be signed in to change notification settings - Fork 89
/
meson.build
93 lines (82 loc) · 2.43 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
project('gpuvis', 'c', 'cpp',
version : '1.0.0',
default_options : [
'warning_level=2',
'c_std=gnu99',
'cpp_std=c++11',
'default_library=static',
],
license : 'MIT',
meson_version : '>= 0.44.0')
add_project_arguments(['-Wno-unused-parameter',
'-Wno-sign-compare'],
language: ['cpp'])
if ['linux', 'sunos'].contains(host_machine.system())
add_project_arguments(['-D_LARGEFILE64_SOURCE=1', '-D_FILE_OFFSET_BITS=64'],
language: ['c', 'cpp'])
endif
c = meson.get_compiler('c')
cc = meson.get_compiler('cpp')
all_deps = [
cc.find_library('dl', required: false),
dependency('sdl2'),
]
compile_flags = [
'-Wno-unused-parameter'
]
if get_option('use_freetype')
compile_flags += '-DUSE_FREETYPE=1'
all_deps += dependency('freetype2')
endif
if get_option('use_gtk3')
compile_flags += '-DUSE_GTK3=1'
all_deps += dependency('gtk+-3.0')
endif
if get_option('use_i915_perf')
compile_flags += '-DUSE_I915_PERF=1'
all_deps += dependency('i915-perf',
version : '>= 1.5.0')
all_deps += dependency('xe-oa')
endif
if get_option('have_rapidjson')
compile_flags += '-DHAVE_RAPIDJSON=1'
all_deps += dependency('RapidJSON')
endif
gpuvis_files = files(
'src/gpuvis.cpp',
'src/gpuvis_graph.cpp',
'src/gpuvis_framemarkers.cpp',
'src/gpuvis_plots.cpp',
'src/gpuvis_graphrows.cpp',
'src/gpuvis_ftrace_print.cpp',
'src/gpuvis_i915_perfcounters.cpp',
'src/gpuvis_utils.cpp',
'src/gpuvis_etl.cpp',
'src/etl_utils.cpp',
'src/tdopexpr.cpp',
'src/ya_getopt.c',
'src/MurmurHash3.cpp',
'src/miniz.c',
'src/stlini.cpp',
'src/imgui/imgui_impl_sdl_gl3.cpp',
'src/imgui/imgui.cpp',
'src/imgui/imgui_demo.cpp',
'src/imgui/imgui_draw.cpp',
'src/imgui/imgui_freetype.cpp',
'src/GL/gl3w.c',
'src/i915-perf/i915-perf-read.cpp',
'src/libtraceevent/src/event-parse.c',
'src/libtraceevent/src/event-parse-api.c',
'src/libtraceevent/src/event-plugin.c',
'src/libtraceevent/src/kbuffer-parse.c',
'src/libtraceevent/src/parse-utils.c',
'src/libtraceevent/src/trace-seq.c',
'src/trace-cmd/trace-read.cpp',
)
incdir = include_directories('src/libtraceevent/include')
executable('gpuvis', gpuvis_files,
c_args : compile_flags,
cpp_args : compile_flags,
dependencies : all_deps,
install : true,
include_directories : incdir)