mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
build: Add more Meson options for disabling parts of the build
This is all aimed at making it so that sysprof can be built as a subproject within GLib, with only `libsysprof-capture-4.a` being produced as output. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
if get_option('enable_examples')
|
||||
|
||||
app = executable('example-app', 'app.c',
|
||||
dependencies: [dependency('glib-2.0'), libsysprof_capture_dep],
|
||||
)
|
||||
|
||||
endif
|
||||
|
||||
@ -32,3 +32,15 @@ option('help', type: 'boolean')
|
||||
|
||||
# Disable use of libunwind
|
||||
option('libunwind', type: 'boolean')
|
||||
|
||||
# Optionally disable the tools (this is mostly only useful for building only
|
||||
# libsysprof-capture as a subproject)
|
||||
option('enable_tools', type: 'boolean')
|
||||
|
||||
# Optionally disable the tests (this is mostly only useful for building only
|
||||
# libsysprof-capture as a subproject)
|
||||
option('enable_tests', type: 'boolean')
|
||||
|
||||
# Optionally disable the examples (this is mostly only useful for building only
|
||||
# libsysprof-capture as a subproject)
|
||||
option('enable_examples', type: 'boolean')
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
if get_option('enable_tests')
|
||||
|
||||
test_env = [
|
||||
'G_TEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
|
||||
'G_TEST_BUILDDIR="@0@"'.format(meson.current_build_dir()),
|
||||
@ -147,3 +149,4 @@ if get_option('enable_gtk')
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
if get_option('enable_tools')
|
||||
|
||||
tools_deps = [
|
||||
dependency('glib-2.0'),
|
||||
libsysprof_capture_dep,
|
||||
@ -42,3 +44,5 @@ list_threads = executable('list-threads', ['list-threads.c'],
|
||||
c_args: tools_cflags,
|
||||
install: false,
|
||||
)
|
||||
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user