blob: 25017e4325fab899df979b42d02616fba7e56ec4 [file] [log] [blame]
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -05001# SPDX-License-Identifier: Apache-2.0
2
3cxx = meson.get_compiler('cpp')
4
5collect_deps = [
6 CLI11_dep,
7 phosphorlogging,
8 cxx.find_library('pdbg'),
9 cxx.find_library('libdt-api'),
10 cxx.find_library('phal'),
11]
12
13# source files
14
15collect_src = files(
16 'sbe_dump_collector.cpp',
17 'dump_collect_main.cpp',
18 'dump_utils.cpp',
Dhruvaraj Subhashchandran6feeebd2021-10-19 05:03:59 -050019 'create_pel.cpp',
Dhruvaraj Subhashchandrane74e9162024-04-01 09:53:13 -050020 'dump_utils.cpp',
Dhruvaraj Subhashchandran6feeebd2021-10-19 05:03:59 -050021 'sbe_type.cpp',
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050022)
23
24executable('dump-collect',
25 collect_src,
26 dependencies: collect_deps,
27 implicit_include_directories: true,
28 install: true
29)
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050030
31bindir = get_option('bindir')
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050032dreport_include_dir = join_paths(get_option('datadir'), 'dreport.d/include.d')
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050033
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050034scripts_to_install = []
35include_scripts = []
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050036
37subdir('tools')
38# Install collected files if any
39if scripts_to_install.length() > 0
40 install_data(scripts_to_install,
41 install_dir: get_option('bindir'),
42 install_mode: 'rwxr-xr-x'
43 )
44endif
45
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050046# Install collected include scripts if any
47if include_scripts.length() > 0
48 install_data(include_scripts,
49 install_dir: dreport_include_dir,
50 install_mode: 'rwxr-xr-x'
51 )
52endif
53
54