1From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001
2From: Markus Volk <f_l_k@t-online.de>
3Date: Mon, 17 Oct 2022 19:20:53 +0200
4Subject: [PATCH] meson: add PC file for lib_perfetto
5
6---
7Upstream-Status: Pending
8
9 meson.build | 12 ++++++++++--
10 1 file changed, 10 insertions(+), 2 deletions(-)
11
12--- a/meson.build
13+++ b/meson.build
14@@ -19,9 +19,12 @@
15 project(
16     'perfetto',
17     ['cpp'],
18-    default_options: ['cpp_std=c++17']
19+    default_options: ['cpp_std=c++17'],
20+    version: '31.0'
21 )
22
23+soversion = meson.project_version()
24+
25 fs = import('fs')
26
27 if not fs.is_dir('sdk')
28@@ -36,8 +39,9 @@ if host_machine.system() == 'android'
29   deps_perfetto += cpp.find_library('log')
30 endif
31
32-lib_perfetto = static_library(
33+lib_perfetto = shared_library(
34     'perfetto',
35+    version: soversion,
36     sources: 'sdk/perfetto.cc',
37     dependencies: deps_perfetto,
38     install: true,
39@@ -50,6 +54,10 @@ dir_perfetto_trace = join_paths(meson.cu
40
41 install_data(dir_perfetto_trace / 'perfetto_trace.proto')
42
43+install_headers('sdk/perfetto.h')
44+pkg = import('pkgconfig')
45+pkg.generate(lib_perfetto)
46+
47 dep_perfetto = declare_dependency(
48     link_with: lib_perfetto,
49     include_directories: inc_perfetto,
50