build: Only run gdbus-codegen if building components which need it

This is to avoid running `gdbus-codegen` when building sysprof as a
subproject underneath libglib, as by that point in the GLib build
process, `gdbus-codegen` is not yet available.

The interfaces generated by these `gdbus-codegen` invocations are only
needed for `sysprofd` and libsysprof, not for the libraries like
`libsysprof-capture`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall
2020-06-25 15:31:16 +01:00
parent 5d1678974a
commit e03b54fca5
2 changed files with 24 additions and 22 deletions

View File

@ -28,12 +28,14 @@ sysprof_dump = executable('sysprof-dump', 'sysprof-dump.c',
install: false,
)
sysprof_profiler_ctl = executable('sysprof-profiler-ctl',
[ 'sysprof-profiler-ctl.c', ipc_profiler_src ],
dependencies: [ tools_deps, dependency('gio-unix-2.0', version: glib_req_version) ],
c_args: tools_cflags,
install: false,
)
if get_option('with_sysprofd') == 'bundled' or get_option('libsysprof')
sysprof_profiler_ctl = executable('sysprof-profiler-ctl',
[ 'sysprof-profiler-ctl.c', ipc_profiler_src ],
dependencies: [ tools_deps, dependency('gio-unix-2.0', version: glib_req_version) ],
c_args: tools_cflags,
install: false,
)
endif
list_threads = executable('list-threads', ['list-threads.c'],
dependencies: [ tools_deps ],