blob: 06015141ca5a6ab575761c704bf96fbd0ab3a5ee [file] [log] [blame]
Antonio Caggiano5ec0f862021-03-26 13:16:01 +01001# Copyright (C) 2021 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# This meson project only supports the Perfetto SDK
16# available from release branches.
17# https://perfetto.dev/docs/instrumentation/tracing-sdk
18
19project(
20 'perfetto',
21 ['c','cpp'],
22 default_options: ['c_std=c99', 'cpp_std=c++11']
23)
24
25fs = import('fs')
26
27if not fs.is_dir('sdk')
Primiano Tuccid399a652021-04-01 13:29:31 +010028 error('sdk dir not found, please checkout a release tag, e.g. v14.0')
Antonio Caggiano5ec0f862021-03-26 13:16:01 +010029endif
30
31dep_threads = dependency('threads')
32
33lib_perfetto = static_library(
34 'perfetto',
35 sources: 'sdk/perfetto.cc',
36 dependencies: dep_threads,
Antonio Caggiano749909b2021-10-28 12:36:01 +020037 install: true,
Antonio Caggiano5ec0f862021-03-26 13:16:01 +010038)
39
40inc_perfetto = include_directories('sdk')
41
42dep_perfetto = declare_dependency(
43 link_with: lib_perfetto,
44 include_directories: inc_perfetto,
45)