summaryrefslogtreecommitdiff
path: root/src/intel/ds/meson.build
blob: 64b6c9e36ebdb225808c192e2a50584cac588fb8 (plain)
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
# Copyright © 2020-2021 Collabora, Ltd.
# Author: Antonio Caggiano <antonio.caggiano@collabora.com>
#
# SPDX-License-Identifier: MIT

intel_tracepoint_files = custom_target(
  'intel_tracepoints.[ch]',
  input : 'intel_tracepoints.py',
  output : ['intel_tracepoints.h',
            'intel_tracepoints_perfetto.h',
            'intel_tracepoints.c'],
  command : [
    prog_python, '@INPUT@',
    '-p', join_paths(meson.source_root(), 'src/util/perf/'),
    '--utrace-hdr', '@OUTPUT0@',
    '--perfetto-hdr', '@OUTPUT1@',
    '--utrace-src', '@OUTPUT2@',
  ],
  depend_files : u_trace_py,
)

libintel_driver_ds_deps = [
  idep_mesautil,
  idep_nir_headers,
]

if with_perfetto
  libintel_driver_ds_deps += dep_perfetto
endif

idep_intel_driver_ds_headers = declare_dependency(
  sources : intel_tracepoint_files[0],
  include_directories : [inc_include, inc_mapi, inc_mesa, inc_intel],
)

libintel_driver_ds = static_library(
  'intel-driver-ds',
  sources : ['intel_driver_ds.cc', intel_tracepoint_files],
  include_directories : [inc_src, inc_include, inc_intel, inc_mapi, inc_mesa],
  link_with : [libintel_perf, libintel_dev],
  dependencies : libintel_driver_ds_deps,
  cpp_args : '-std=c++17',
  gnu_symbol_visibility : 'hidden',
)

idep_intel_driver_ds = declare_dependency(
  link_with : libintel_driver_ds,
  include_directories : [inc_include, inc_mapi, inc_mesa, inc_intel],
  dependencies : idep_intel_driver_ds_headers,
)

if with_perfetto and (with_datasources.contains('intel') or with_datasources.contains('auto'))
  pps_intel_sources = files(
    'intel_pps_perf.cc',
    'intel_pps_driver.cc',
  )

  pps_intel_lib = static_library(
    'pps-intel',
    sources: pps_intel_sources,
    include_directories: [inc_tool, inc_src, inc_include, inc_intel],
    link_with: [libintel_perf, libintel_dev],
    dependencies: [dep_perfetto, dep_libdrm, idep_mesautil],
    cpp_args: '-std=c++17'
  )

  compile_args_pps_intel = ['-DPPS_INTEL']

  pps_intel_dep = declare_dependency(
    link_with: pps_intel_lib,
    include_directories: [inc_tool, inc_include],
    compile_args: compile_args_pps_intel,
  )

  pps_datasources += pps_intel_dep
  if not with_datasources.contains('intel')
    with_datasources += 'intel'
  endif
endif