build: fix -Dagent=true -Dlibsysprof=false

The agent is statically linked so that it doesn't require using a properly
working libsysprof to be installed. This ensures that it continues to build
properly in that case so it can be used from org.gnome.Sdk.
This commit is contained in:
Christian Hergert
2022-07-22 11:54:34 -07:00
parent a12177e447
commit 0dc0a5b3de
2 changed files with 17 additions and 12 deletions

View File

@ -28,7 +28,7 @@ polkit_req_version = '>= 0.105'
cc = meson.get_compiler('c')
if get_option('libsysprof')
if get_option('libsysprof') or get_option('agent')
add_languages('cpp', native: false)
cxx = meson.get_compiler('cpp')
endif
@ -197,6 +197,14 @@ int main(void) {
config_h.set10('HAVE_STDATOMIC_H', true)
endif
if get_option('libsysprof') or get_option('agent')
needs_service_access = true
endif
if needs_service_access or get_option('sysprofd') == 'bundled'
install_service_files = true
endif
subdir('src')
subdir('data')
subdir('po')