summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2023-06-08 16:07:45 +0200
committerMarge Bot <emma+marge@anholt.net>2023-06-12 09:42:12 +0000
commitd5ea3be0e26d942b3d3061f42a93d1626d749348 (patch)
tree4250383832241662632a2479d65ed201591b81db
parentc16a4291788f2991efe77bf9146f7ab25787b02a (diff)
meson: Allow to include any profiler during the build as a dependency
This allows anyone to easily test that the profiler backend is actually building. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1147>
-rw-r--r--meson.build2
-rw-r--r--subprojects/packagefiles/vperfetto/meson.build33
-rw-r--r--subprojects/percetto.wrap9
-rw-r--r--subprojects/perfetto.wrap9
-rw-r--r--subprojects/sysprof.wrap9
-rw-r--r--subprojects/vperfetto.wrap10
6 files changed, 71 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 466e08f..ca6054f 100644
--- a/meson.build
+++ b/meson.build
@@ -25,7 +25,7 @@ project(
'virglrenderer', 'c',
version: '0.10.4',
license : 'MIT',
- meson_version : '>= 0.53',
+ meson_version : '>= 0.55',
default_options : ['buildtype=release', 'b_ndebug=if-release',
'warning_level=3', 'c_std=gnu11']
)
diff --git a/subprojects/packagefiles/vperfetto/meson.build b/subprojects/packagefiles/vperfetto/meson.build
new file mode 100644
index 0000000..004f94a
--- /dev/null
+++ b/subprojects/packagefiles/vperfetto/meson.build
@@ -0,0 +1,33 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+project(
+ 'vperfetto',
+ ['cpp'],
+ default_options: ['cpp_std=c++17']
+)
+
+deps_vperfetto = [dependency('threads')]
+
+lib_vperfetto_min = library(
+ 'vperfetto_min',
+ 'vperfetto-min.cpp',
+ 'perfetto.cc',
+ dependencies: deps_vperfetto,
+ install: true,
+)
+
+dep_vperfetto_min = declare_dependency(
+ link_with: lib_vperfetto_min,
+ include_directories: include_directories('.'),
+)
+meson.override_dependency('vperfetto_min', dep_vperfetto_min)
diff --git a/subprojects/percetto.wrap b/subprojects/percetto.wrap
new file mode 100644
index 0000000..eacde27
--- /dev/null
+++ b/subprojects/percetto.wrap
@@ -0,0 +1,9 @@
+[wrap-git]
+directory=percetto
+
+url=https://github.com/olvaffe/percetto.git
+revision=f7ed7120ee7480b0890a4ee819c3828c5b036f47
+depth=1
+
+[provide]
+dependency_names=percetto
diff --git a/subprojects/perfetto.wrap b/subprojects/perfetto.wrap
new file mode 100644
index 0000000..7dfb6e8
--- /dev/null
+++ b/subprojects/perfetto.wrap
@@ -0,0 +1,9 @@
+[wrap-git]
+directory=perfetto
+
+url=https://android.googlesource.com/platform/external/perfetto
+revision=v29.0
+depth=1
+
+[provide]
+perfetto=dep_perfetto
diff --git a/subprojects/sysprof.wrap b/subprojects/sysprof.wrap
new file mode 100644
index 0000000..280c393
--- /dev/null
+++ b/subprojects/sysprof.wrap
@@ -0,0 +1,9 @@
+[wrap-git]
+directory=sysprof
+
+url=https://gitlab.gnome.org/GNOME/sysprof.git
+revision=3.48.0
+depth=1
+
+[provide]
+dependency_names=sysprof-capture-4
diff --git a/subprojects/vperfetto.wrap b/subprojects/vperfetto.wrap
new file mode 100644
index 0000000..fb596eb
--- /dev/null
+++ b/subprojects/vperfetto.wrap
@@ -0,0 +1,10 @@
+[wrap-git]
+directory=vperfetto
+
+url=https://github.com/741g/vperfetto.git
+revision=46898c58f72ae5790c18dd6b2316b8efc4c37b1a
+depth=1
+patch_directory=vperfetto
+
+[provide]
+dependency_names=vperfetto_min