build: Misc cleanup of options

Cleanup of option names, use features where applicable, and printing
of summary.
This commit is contained in:
Patrick Griffis
2021-07-13 11:12:22 -05:00
parent 25440a07c3
commit cbb0927a7a
9 changed files with 91 additions and 55 deletions

View File

@@ -2,8 +2,8 @@ appdir = join_paths(get_option('datadir'), 'applications')
metainfodir = join_paths(get_option('datadir'), 'metainfo')
desktop_utils = find_program('desktop-file-validate', required: false)
if get_option('with-gtk')
if get_option('with-appdata')
if get_option('gtk-frontend')
if get_option('install-appdata')
hexchat_appdata = i18n.merge_file(
input: 'io.github.Hexchat.appdata.xml.in',
output: 'io.github.Hexchat.appdata.xml',
@@ -21,7 +21,7 @@ if get_option('with-gtk')
endif
desktop_conf = configuration_data()
if get_option('with-dbus')
if dbus_glib_dep.found()
desktop_conf.set('exec_command', 'hexchat --existing %U')
else
desktop_conf.set('exec_command', 'hexchat %U')
@@ -49,7 +49,7 @@ if get_option('with-gtk')
endif
endif
if get_option('with-theme-manager')
if get_option('theme-manager')
htm_desktop = i18n.merge_file(
input: 'io.github.Hexchat.ThemeManager.desktop.in',
output: 'io.github.Hexchat.ThemeManager.desktop',
@@ -70,7 +70,7 @@ if get_option('with-theme-manager')
)
endif
if get_option('with-plugin') and get_option('with-appdata')
if get_option('plugin')
plugin_metainfo = []
# FIXME: These should all get translated somewhere
@@ -124,4 +124,4 @@ if get_option('with-plugin') and get_option('with-appdata')
install_dir: get_option('install-plugin-metainfo') ? metainfodir : '',
)
endforeach
endif
endif