diff --git a/deps/perfetto/BUILD.gn b/deps/perfetto/BUILD.gn new file mode 100644 index 00000000000..df485c384d9 --- /dev/null +++ b/deps/perfetto/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +perfetto_sdk_gn_build("perfetto_sdk") { +} diff --git a/deps/perfetto/VERSION b/deps/perfetto/VERSION new file mode 100644 index 00000000000..ba66466c2a0 --- /dev/null +++ b/deps/perfetto/VERSION @@ -0,0 +1 @@ +0.0 diff --git a/deps/perfetto/perfetto.gyp b/deps/perfetto/perfetto.gyp new file mode 100644 index 00000000000..3836f3424cb --- /dev/null +++ b/deps/perfetto/perfetto.gyp @@ -0,0 +1,22 @@ +{ + 'variables': { + 'perfetto_sdk_sources': [ + 'sdk/perfetto.cc', + 'sdk/perfetto.h', + ] + }, + 'targets': [ + { + 'target_name': 'perfetto_sdk', + 'type': 'static_library', + 'include_dirs': [ 'sdk' ], + 'direct_dependent_settings': { + # Use like `#include "perfetto.h"` + 'include_dirs': [ 'sdk' ], + }, + 'sources': [ + '<@(perfetto_sdk_sources)', + ], + }, + ] +} diff --git a/deps/perfetto/unofficial.gni b/deps/perfetto/unofficial.gni new file mode 100644 index 00000000000..6b73bf13435 --- /dev/null +++ b/deps/perfetto/unofficial.gni @@ -0,0 +1,22 @@ +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("perfetto_sdk_gn_build") { + config("perfetto_sdk_config") { + include_dirs = [ "./sdk" ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("perfetto.gyp") ], + "scope", + [ "perfetto.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":perfetto_sdk_config" ] + sources = gypi_values.perfetto_sdk_sources + } +}