mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Merge branch 'meson' of https://gitlab.gnome.org/tristan957/sysprof
This commit is contained in:
@ -3,7 +3,7 @@ libeggbitset_sources = [
|
||||
]
|
||||
|
||||
libeggbitset_deps = [
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
gio_dep,
|
||||
]
|
||||
|
||||
libeggbitset_static = static_library('eggbitset', libeggbitset_sources,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
liblinereader_deps = [
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
gio_dep,
|
||||
]
|
||||
|
||||
liblinereader_static_dep = declare_dependency(
|
||||
|
||||
22
meson.build
22
meson.build
@ -1,7 +1,7 @@
|
||||
project('sysprof', ['c', 'cpp'],
|
||||
license: ['GPL3+', 'GPL2+'],
|
||||
project('sysprof', 'c', 'cpp',
|
||||
license: 'GPL-3.0-or-later OR GPL-2.0-or-later',
|
||||
version: '45.alpha',
|
||||
meson_version: '>=0.59.0',
|
||||
meson_version: '>=0.62.0',
|
||||
default_options: [ 'c_std=gnu17',
|
||||
'cpp_std=gnu++17',
|
||||
'warning_level=2',
|
||||
@ -39,7 +39,7 @@ need_glib = (need_gtk or
|
||||
get_option('examples') or
|
||||
get_option('sysprofd') != 'none' or
|
||||
get_option('tools') or
|
||||
get_option('tests'))
|
||||
get_option('tests'))
|
||||
need_libsysprof = (need_gtk or
|
||||
get_option('libsysprof') or
|
||||
get_option('examples') or
|
||||
@ -60,18 +60,20 @@ cc = meson.get_compiler('c')
|
||||
cxx = meson.get_compiler('cpp')
|
||||
|
||||
glib_dep = dependency('glib-2.0', version: glib_req_version, required: need_glib)
|
||||
gio_dep = dependency('gio-2.0', version: glib_req_version, required: need_glib)
|
||||
gio_unix_dep = dependency('gio-unix-2.0', version: glib_req_version, required: host_machine.system() != 'windows')
|
||||
gtk_dep = dependency('gtk4', version: gtk_req_version, required: need_gtk)
|
||||
libsystemd_dep = dependency('libsystemd', required: false)
|
||||
|
||||
config_h = configuration_data()
|
||||
config_h.set_quoted('SYMBOLIC_VERSION', symbolic_version)
|
||||
config_h.set_quoted('API_VERSION_S', '@0@'.format(libsysprof_api_version))
|
||||
config_h.set_quoted('API_VERSION_S', libsysprof_api_version.to_string())
|
||||
config_h.set_quoted('PACKAGE_NAME', 'sysprof')
|
||||
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
config_h.set_quoted('PACKAGE_STRING', 'sysprof-' + meson.project_version())
|
||||
config_h.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/sysprof/-/issues/new')
|
||||
config_h.set_quoted('PACKAGE_LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir')))
|
||||
config_h.set_quoted('PACKAGE_LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
|
||||
config_h.set_quoted('PACKAGE_LIBEXECDIR', get_option('libexecdir'))
|
||||
config_h.set_quoted('PACKAGE_LIBDIR', get_option('libdir'))
|
||||
config_h.set('PACKAGE_TARNAME', 'PACKAGE_STRING')
|
||||
config_h.set('PACKAGE', 'PACKAGE_NAME')
|
||||
config_h.set('VERSION', 'PACKAGE_VERSION')
|
||||
@ -120,9 +122,7 @@ if get_option('libunwind')
|
||||
endif
|
||||
|
||||
# Development build setup
|
||||
if get_option('development')
|
||||
config_h.set10('DEVELOPMENT_BUILD', true)
|
||||
endif
|
||||
config_h.set10('DEVELOPMENT_BUILD', get_option('development'))
|
||||
|
||||
has_use_clockid = cc.has_member('struct perf_event_attr',
|
||||
'use_clockid',
|
||||
@ -133,7 +133,7 @@ has_clockid = cc.has_member('struct perf_event_attr',
|
||||
config_h.set('HAVE_PERF_CLOCKID', has_use_clockid and has_clockid)
|
||||
|
||||
# For config.h
|
||||
add_project_arguments(['-I'+meson.current_build_dir()], language: 'c')
|
||||
add_project_arguments('-I' + meson.current_build_dir(), language: 'c')
|
||||
|
||||
global_c_args = [
|
||||
'-DSYSPROF_COMPILATION',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# If this is a development build, which is used for our Flatpak build
|
||||
# so that we have a different app-id (.Devel suffix) than the regular
|
||||
# application.
|
||||
option('development', type: 'boolean', value: 'false')
|
||||
option('development', type: 'boolean', value: false)
|
||||
|
||||
# Optionally disable the GTK application in case you're building the
|
||||
# sysprof-cli only for your platform. Might be useful in IoT or various
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
install_static = not meson.is_subproject() and get_option('install-static')
|
||||
|
||||
libsysprof_capture_headers = files([
|
||||
libsysprof_capture_headers = files(
|
||||
'sysprof-address.h',
|
||||
'sysprof-clock.h',
|
||||
'sysprof-capture-condition.h',
|
||||
@ -13,17 +13,17 @@ libsysprof_capture_headers = files([
|
||||
'sysprof-platform.h',
|
||||
'sysprof-capture.h',
|
||||
'sysprof-version-macros.h',
|
||||
])
|
||||
)
|
||||
|
||||
if not meson.is_subproject()
|
||||
install_headers(libsysprof_capture_headers, subdir: sysprof_header_subdir)
|
||||
endif
|
||||
|
||||
mapped_ring_buffer_sources = files([
|
||||
mapped_ring_buffer_sources = files(
|
||||
'mapped-ring-buffer.c',
|
||||
])
|
||||
)
|
||||
|
||||
libsysprof_capture_sources = files([
|
||||
libsysprof_capture_sources = files(
|
||||
'sysprof-address.c',
|
||||
'sysprof-capture-condition.c',
|
||||
'sysprof-capture-cursor.c',
|
||||
@ -34,7 +34,7 @@ libsysprof_capture_sources = files([
|
||||
'sysprof-collector.c',
|
||||
'sysprof-clock.c',
|
||||
'sysprof-platform.c',
|
||||
])
|
||||
)
|
||||
|
||||
configure_file(
|
||||
input: 'sysprof-version.h.in',
|
||||
@ -55,7 +55,6 @@ libsysprof_capture = static_library(
|
||||
|
||||
dependencies: libsysprof_capture_deps,
|
||||
c_args: [ '-DSYSPROF_CAPTURE_COMPILATION' ],
|
||||
install_dir: get_option('libdir'),
|
||||
install: install_static,
|
||||
gnu_symbol_visibility: 'hidden',
|
||||
pic: true,
|
||||
@ -75,7 +74,6 @@ if install_static
|
||||
libsysprof_capture,
|
||||
subdirs: [ sysprof_header_subdir ],
|
||||
description: 'The static capture library for tools that generate profiling capture data',
|
||||
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
|
||||
variables: [ 'datadir=' + datadir_for_pc_file ],
|
||||
libraries_private: libsysprof_capture_deps,
|
||||
)
|
||||
|
||||
@ -25,7 +25,7 @@ libsysprof_capture_testsuite = {
|
||||
}
|
||||
|
||||
libsysprof_capture_testsuite_deps = [
|
||||
dependency('gio-2.0'),
|
||||
gio_dep,
|
||||
libsysprof_capture_dep,
|
||||
]
|
||||
|
||||
|
||||
@ -171,10 +171,8 @@ libsysprof_resources = gnome.compile_resources('libsysprof-resources', 'libsyspr
|
||||
)
|
||||
|
||||
libsysprof_deps = [
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
dependency('gio-unix-2.0',
|
||||
version: glib_req_version,
|
||||
required: host_machine.system() != 'windows'),
|
||||
gio_dep,
|
||||
gio_unix_dep,
|
||||
dependency('libdex-1', version: dex_req_version),
|
||||
dependency('json-glib-1.0'),
|
||||
|
||||
@ -225,7 +223,6 @@ meson.override_dependency('sysprof-@0@'.format(soname_major_version), libsysprof
|
||||
pkgconfig.generate(libsysprof,
|
||||
subdirs: [sysprof_header_subdir],
|
||||
description: 'A library for recording and analyzing system performance',
|
||||
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
|
||||
requires: ['gio-2.0'],
|
||||
variables: ['datadir=' + datadir_for_pc_file],
|
||||
)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
libdl_dep = cc.find_library('dl', required: false)
|
||||
libdl_dep = dependency('dl', required: false)
|
||||
|
||||
preload_deps = [
|
||||
dependency('glib-2.0'),
|
||||
@ -15,19 +15,16 @@ libsysprof_memory_preload = shared_library('sysprof-memory-@0@'.format(libsyspro
|
||||
['sysprof-memory-collector.c'],
|
||||
dependencies: preload_deps,
|
||||
install: true,
|
||||
install_dir: get_option('libdir'),
|
||||
)
|
||||
|
||||
libsysprof_speedtrack_preload = shared_library('sysprof-speedtrack-@0@'.format(libsysprof_api_version),
|
||||
['sysprof-speedtrack-collector.c'],
|
||||
dependencies: preload_deps,
|
||||
install: true,
|
||||
install_dir: get_option('libdir'),
|
||||
)
|
||||
|
||||
libsysprof_tracer_preload = shared_library('sysprof-tracer-@0@'.format(libsysprof_api_version),
|
||||
['sysprof-tracer-collector.c'],
|
||||
dependencies: preload_deps,
|
||||
install: true,
|
||||
install_dir: get_option('libdir'),
|
||||
)
|
||||
|
||||
@ -19,10 +19,9 @@ sysprof_agent_deps = [
|
||||
sysprof_agent = executable('sysprof-agent', sysprof_agent_sources,
|
||||
dependencies: sysprof_agent_deps,
|
||||
c_args: release_flags + sysprof_agent_c_args,
|
||||
install_dir: get_option('bindir'),
|
||||
install: true,
|
||||
)
|
||||
|
||||
install_data(['org.gnome.Sysprof.Agent.xml'],
|
||||
install_data('org.gnome.Sysprof.Agent.xml',
|
||||
install_dir: join_paths(datadir, 'dbus-1/interfaces'),
|
||||
)
|
||||
|
||||
@ -14,6 +14,5 @@ sysprof_cli_deps = [
|
||||
sysprof_cli = executable('sysprof-cli', sysprof_cli_sources,
|
||||
dependencies: sysprof_cli_deps,
|
||||
c_args: release_flags + sysprof_cli_c_args,
|
||||
install_dir: get_option('bindir'),
|
||||
install: true,
|
||||
)
|
||||
|
||||
@ -84,6 +84,5 @@ sysprof_deps = [
|
||||
|
||||
sysprof = executable('sysprof', sysprof_resources + sysprof_sources,
|
||||
dependencies: sysprof_deps,
|
||||
install_dir: get_option('bindir'),
|
||||
install: true,
|
||||
)
|
||||
|
||||
@ -20,12 +20,12 @@ sysprofd_sources = [
|
||||
ipc_service_src,
|
||||
]
|
||||
|
||||
pkglibexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
|
||||
pkglibexecdir = get_option('libexecdir')
|
||||
|
||||
sysprofd_deps = [
|
||||
dependency('glib-2.0', version: glib_req_version),
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
dependency('gio-unix-2.0', version: glib_req_version),
|
||||
glib_dep,
|
||||
gio_dep,
|
||||
gio_unix_dep,
|
||||
polkit_dep,
|
||||
|
||||
libsysprof_capture_dep,
|
||||
@ -80,9 +80,8 @@ i18n.merge_file(
|
||||
install_dir: join_paths(datadir, 'polkit-1/actions'),
|
||||
)
|
||||
|
||||
install_data([
|
||||
'org.gnome.Sysprof3.Profiler.xml',
|
||||
'org.gnome.Sysprof3.Service.xml',
|
||||
],
|
||||
install_data(
|
||||
'org.gnome.Sysprof3.Profiler.xml',
|
||||
'org.gnome.Sysprof3.Service.xml',
|
||||
install_dir: join_paths(datadir, 'dbus-1/interfaces'),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user