summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch
blob: ae644747c10ee1f7778a627cadf63a8db430141f (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
From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Mon, 17 Oct 2022 19:20:53 +0200
Subject: [PATCH] meson: add PC file for lib_perfetto

---
Upstream-Status: Pending

 meson.build | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/meson.build
+++ b/meson.build
@@ -19,9 +19,12 @@
 project(
     'perfetto',
     ['cpp'],
-    default_options: ['cpp_std=c++17']
+    default_options: ['cpp_std=c++17'],
+    version: '31.0'
 )
 
+soversion = meson.project_version()
+
 fs = import('fs')
 
 if not fs.is_dir('sdk')
@@ -36,8 +39,9 @@ if host_machine.system() == 'android'
   deps_perfetto += cpp.find_library('log')
 endif
 
-lib_perfetto = static_library(
+lib_perfetto = shared_library(
     'perfetto',
+    version: soversion,
     sources: 'sdk/perfetto.cc',
     dependencies: deps_perfetto,
     install: true,
@@ -50,6 +54,10 @@ dir_perfetto_trace = join_paths(meson.cu
 
 install_data(dir_perfetto_trace / 'perfetto_trace.proto')
 
+install_headers('sdk/perfetto.h')
+pkg = import('pkgconfig')
+pkg.generate(lib_perfetto)
+
 dep_perfetto = declare_dependency(
     link_with: lib_perfetto,
     include_directories: inc_perfetto,