capture: avoid GObject in libsysprof-capture-2.a

The point of this file was to be easily usable by applications that want
to generate capture files (or proxy them). The intention here is that we
only have SpCaptureReader/SpCaptureWriter (and associated bits necessary
to support that).

This makes sure that we do not use GObject from the libsysprof-capture-2.a
while still having GType's in the libsysprof-2.so dynamic library.

We also invert the GObject macro check so that the default is to not
register a GType which increases the chances that copy/paste code does
not run into double-registering a GType if used with an application that
links against libsysprof-2. (One such example could be if Gtk uses this
code for timers, as it would break Sysprof itself).
This commit is contained in:
Christian Hergert
2018-05-21 13:52:02 -07:00
parent 5cc838fd47
commit b3bf7968ad
11 changed files with 30 additions and 21 deletions

View File

@ -1,9 +1,9 @@
sysprof_cli = executable('sysprof-cli',
'sysprof-cli.c',
dependencies: libsysprof_dep,
c_args: exe_c_args,
link_args: exe_link_args,
install: true,
c_args: exe_c_args,
link_args: exe_link_args,
install: true,
)
sysprof_cat = executable('sysprof-cat', 'sysprof-cat.c',
@ -15,6 +15,6 @@ sysprof_cat = executable('sysprof-cat', 'sysprof-cat.c',
sysprof_dump = executable('sysprof-dump',
'sysprof-dump.c',
dependencies: libsysprof_capture_dep,
c_args: exe_c_args,
link_args: exe_link_args,
c_args: exe_c_args,
link_args: exe_link_args,
)