• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1cmake_minimum_required(VERSION 3.5)
2
3set(PERFETTO_TRACING_ONLY_ROOT ${GFXSTREAM_REPO_ROOT}/third-party/perfetto-tracing-only)
4set(PERFETTO_ROOT ${GFXSTREAM_REPO_ROOT}/third-party/perfetto)
5
6#######################################
7### perfetto-libperfettobase
8#######################################
9
10set(PERFETTO_LIBPERFETTOBASE_SRC
11    ${PERFETTO_ROOT}/src/base/logging.cc
12    ${PERFETTO_ROOT}/src/base/metatrace.cc
13    ${PERFETTO_ROOT}/src/base/paged_memory.cc
14    ${PERFETTO_ROOT}/src/base/string_splitter.cc
15    ${PERFETTO_ROOT}/src/base/string_utils.cc
16    ${PERFETTO_ROOT}/src/base/string_view.cc
17    ${PERFETTO_ROOT}/src/base/subprocess.cc
18    ${PERFETTO_ROOT}/src/base/thread_checker.cc
19    ${PERFETTO_ROOT}/src/base/time.cc
20    ${PERFETTO_ROOT}/src/base/uuid.cc
21    ${PERFETTO_ROOT}/src/base/virtual_destructors.cc
22    ${PERFETTO_ROOT}/src/base/waitable_event.cc
23    ${PERFETTO_ROOT}/src/base/watchdog_posix.cc)
24
25add_library(perfetto-libperfettobase ${PERFETTO_LIBPERFETTOBASE_SRC})
26target_include_directories(
27    perfetto-libperfettobase PUBLIC
28    ${PERFETTO_TRACING_ONLY_ROOT}
29    ${PERFETTO_ROOT}/include)
30
31#######################################
32### perfetto-libprotozero
33#######################################
34
35set(PERFETTO_LIBPROTOZERO_SRC
36    ${PERFETTO_ROOT}/src/protozero/field.cc
37    ${PERFETTO_ROOT}/src/protozero/message.cc
38    ${PERFETTO_ROOT}/src/protozero/message_arena.cc
39    ${PERFETTO_ROOT}/src/protozero/message_handle.cc
40    ${PERFETTO_ROOT}/src/protozero/packed_repeated_fields.cc
41    ${PERFETTO_ROOT}/src/protozero/proto_decoder.cc
42    ${PERFETTO_ROOT}/src/protozero/scattered_heap_buffer.cc
43    ${PERFETTO_ROOT}/src/protozero/scattered_stream_null_delegate.cc
44    ${PERFETTO_ROOT}/src/protozero/scattered_stream_writer.cc
45    ${PERFETTO_ROOT}/src/protozero/static_buffer.cc
46    ${PERFETTO_ROOT}/src/protozero/virtual_destructors.cc)
47
48add_library(perfetto-libprotozero ${PERFETTO_LIBPROTOZERO_SRC})
49target_include_directories(
50    perfetto-libprotozero PUBLIC
51    ${PERFETTO_TRACING_ONLY_ROOT}
52    ${PERFETTO_ROOT}/include)
53
54target_link_libraries(perfetto-libprotozero PUBLIC perfetto-libperfettobase)
55
56#######################################
57### perfetto-trace-only
58#######################################
59set(PERFETTO_TRACING_ONLY_SOURCES
60    perfetto-tracing-only.cpp)
61
62set(PERFETTO_TRACING_ONLY_INCLUDE ${PERFETTO_TRACING_ONLY_ROOT} ${PERFETTO_ROOT}/include)
63
64add_library(perfetto-tracing-only ${PERFETTO_TRACING_ONLY_SOURCES})
65target_include_directories(perfetto-tracing-only PUBLIC ${PERFETTO_TRACING_ONLY_INCLUDE})
66target_link_libraries(perfetto-tracing-only perfetto-libprotozero)
67