Cleanup the build a bit

Makes the Meson build a little bit better and cleans up some of the
formatting.
This commit is contained in:
Tristan Partin
2022-05-25 14:07:02 -05:00
parent 37e9ca2e5f
commit 757d36ae8e
14 changed files with 136 additions and 177 deletions

View File

@ -10,7 +10,7 @@ project('sysprof', 'c',
symbolic_version = '43.alpha0'
gnome = import('gnome')
gnome = import('gnome', required: get_option('gtk'))
pkgconfig = import('pkgconfig')
i18n = import('i18n')
@ -46,7 +46,6 @@ config_h.set('PACKAGE_TARNAME', 'PACKAGE_STRING')
config_h.set('PACKAGE', 'PACKAGE_NAME')
config_h.set('VERSION', 'PACKAGE_VERSION')
# Detect and set symbol visibility
if get_option('default_library') != 'static'
if host_machine.system() == 'windows'
@ -200,16 +199,26 @@ endif
subdir('src')
subdir('data')
subdir('examples')
subdir('help')
subdir('po')
if get_option('help')
subdir('help')
endif
if get_option('examples')
subdir('examples')
endif
configure_file(
input: 'config.h.meson',
output: 'config.h',
configuration: config_h
)
if get_option('enable_gtk')
meson.add_install_script('build-aux/meson/post_install.sh')
if get_option('gtk') and gnome.found()
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true
)
endif