build: add -Dlibsysprof option

This gets us closer to being able to only build the capture static library
This commit is contained in:
Christian Hergert
2019-06-03 12:26:25 -07:00
parent 0d86933ed1
commit 5630e1680f
4 changed files with 9 additions and 2 deletions

View File

@ -3,6 +3,9 @@
# server scenarios.
option('enable_gtk', type: 'boolean')
# Disable libsysprof/ui (in situations you only want sysprof-capture)
option('libsysprof', type: 'boolean')
# Optionally compile sysprofd, which is needed to get elevated privileges.
# You only really want to ignore this if you are running from a container
# and are talking to a host daemon. Also, if you're compiling for something

View File

@ -1,4 +1,4 @@
if get_option('enable_gtk')
if get_option('enable_gtk') and get_option('libsysprof')
libsysprof_ui_public_sources = [
'sysprof-aid.c',

View File

@ -1,3 +1,5 @@
if get_option('libsysprof')
libsysprof_c_args = [ '-DSYSPROF_COMPILATION' ]
libsysprof_public_sources = [
@ -127,3 +129,5 @@ pkgconfig.generate(
)
install_headers(libsysprof_public_headers, subdir: sysprof_header_subdir)
endif

View File

@ -1,4 +1,4 @@
if get_option('enable_gtk')
if get_option('enable_gtk') and get_option('libsysprof')
sysprof_sources = [
'sysprof.c',