2017-05-04 07:45:11 -04:00
|
|
|
project('rofi', 'c',
|
2019-06-26 15:34:39 -04:00
|
|
|
version: '1.5.4-dev',
|
2018-07-10 07:03:52 -04:00
|
|
|
meson_version: '>=0.47.0',
|
2017-05-04 07:45:11 -04:00
|
|
|
license: [ 'MIT' ],
|
|
|
|
default_options: [
|
|
|
|
'c_std=c99',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
c_compiler = meson.get_compiler('c')
|
|
|
|
|
2017-05-04 16:02:57 -04:00
|
|
|
add_project_arguments(
|
|
|
|
'-I@0@'.format(meson.build_root()),
|
|
|
|
'-I@0@'.format(join_paths(meson.source_root(), 'include')),
|
|
|
|
language: 'c'
|
|
|
|
)
|
|
|
|
|
|
|
|
flags = [
|
|
|
|
'-Wparentheses',
|
|
|
|
'-Winline',
|
|
|
|
'-Wunreachable-code',
|
|
|
|
'-Werror=missing-prototypes',
|
2019-04-19 04:09:01 -04:00
|
|
|
'-Wno-inline', # A bit too noisy with Bison…
|
2017-05-04 16:02:57 -04:00
|
|
|
]
|
|
|
|
foreach f : flags
|
|
|
|
if c_compiler.has_argument(f)
|
|
|
|
add_project_arguments(f, language: 'c')
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2019-03-26 07:25:40 -04:00
|
|
|
plugindir = join_paths(get_option('libdir'), meson.project_name())
|
|
|
|
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
|
2017-05-04 07:45:11 -04:00
|
|
|
|
2019-04-19 04:15:06 -04:00
|
|
|
glib_min_major=2
|
|
|
|
glib_min_minor=40
|
|
|
|
glib_min_version='@0@.@1@'.format(glib_min_major, glib_min_minor)
|
2019-03-26 07:25:40 -04:00
|
|
|
plugins_deps = [
|
2019-04-19 04:15:06 -04:00
|
|
|
dependency('glib-2.0', version: '>= @0@'.format(glib_min_version)),
|
2017-05-04 07:45:11 -04:00
|
|
|
dependency('gmodule-2.0'),
|
|
|
|
dependency('cairo'),
|
2019-03-26 07:25:40 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
plugins_deps,
|
|
|
|
dependency('gio-unix-2.0'),
|
2017-05-04 07:45:11 -04:00
|
|
|
dependency('pango'),
|
|
|
|
dependency('pangocairo'),
|
2017-05-27 20:18:09 -04:00
|
|
|
dependency('xkbcommon'),
|
2017-04-12 11:58:32 -04:00
|
|
|
dependency('librsvg-2.0'),
|
2017-05-04 07:45:11 -04:00
|
|
|
c_compiler.find_library('m', required: false),
|
|
|
|
]
|
|
|
|
|
|
|
|
# XCB stuff
|
|
|
|
deps += [
|
|
|
|
subproject('libgwater/xcb').get_variable('libgwater_xcb'),
|
|
|
|
dependency('xcb-aux'),
|
|
|
|
dependency('xcb-xkb'),
|
|
|
|
dependency('xkbcommon-x11'),
|
|
|
|
dependency('xcb-ewmh'),
|
|
|
|
dependency('xcb-icccm'),
|
|
|
|
dependency('xcb-xrm'),
|
|
|
|
dependency('xcb-randr'),
|
|
|
|
dependency('xcb-xinerama'),
|
|
|
|
dependency('cairo-xcb'),
|
|
|
|
dependency('libstartup-notification-1.0'),
|
|
|
|
]
|
|
|
|
|
2019-03-26 07:10:09 -04:00
|
|
|
check = dependency('check', version: '>= 0.11.0', required: get_option('check'))
|
2017-05-04 07:45:11 -04:00
|
|
|
|
|
|
|
header_conf = configuration_data()
|
|
|
|
header_conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
|
|
|
header_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
2018-03-29 06:46:51 -04:00
|
|
|
header_conf.set_quoted('VERSION', meson.project_version())
|
2017-05-04 07:45:11 -04:00
|
|
|
header_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
2019-05-14 05:55:30 -04:00
|
|
|
header_conf.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/davatorium/rofi/')
|
2017-05-04 07:45:11 -04:00
|
|
|
header_conf.set_quoted('PACKAGE_URL', 'https://reddit.com/r/qtools/')
|
|
|
|
|
|
|
|
header_conf.set('THEME_CONVERTER', true)
|
|
|
|
header_conf.set('_GNU_SOURCE', true)
|
|
|
|
|
2017-10-15 11:51:45 -04:00
|
|
|
header_conf.set('USE_NK_GIT_VERSION', true)
|
2017-05-04 07:45:11 -04:00
|
|
|
|
2019-04-19 04:15:06 -04:00
|
|
|
header_conf.set('GLIB_VERSION_MIN_REQUIRED', '(G_ENCODE_VERSION(@0@,@1@))'.format(glib_min_major, glib_min_minor))
|
|
|
|
header_conf.set('GLIB_VERSION_MAX_ALLOWED', '(G_ENCODE_VERSION(@0@,@1@))'.format(glib_min_major, glib_min_minor))
|
|
|
|
|
2019-03-26 07:10:09 -04:00
|
|
|
header_conf.set('ENABLE_DRUN', get_option('drun'))
|
|
|
|
header_conf.set('WINDOW_MODE', get_option('window'))
|
2017-05-04 07:45:11 -04:00
|
|
|
|
|
|
|
header_conf.set_quoted('MANPAGE_PATH', join_paths(get_option('prefix'), get_option('mandir')))
|
|
|
|
header_conf.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir')))
|
2019-03-26 07:25:40 -04:00
|
|
|
header_conf.set_quoted('PLUGIN_PATH', join_paths(get_option('prefix'), plugindir))
|
|
|
|
header_conf.set_quoted('THEME_DIR', join_paths(get_option('prefix'), themedir))
|
2017-05-04 07:45:11 -04:00
|
|
|
|
|
|
|
config_h = configure_file(output: 'config.h', configuration: header_conf)
|
|
|
|
|
2017-10-15 11:51:45 -04:00
|
|
|
nk_options = [
|
2017-05-27 20:18:09 -04:00
|
|
|
'bindings=true',
|
2017-04-12 12:08:57 -04:00
|
|
|
'xdg-theme=true',
|
2017-10-15 12:29:54 -04:00
|
|
|
'git-work-tree=@0@'.format(meson.source_root()),
|
2017-05-27 20:18:09 -04:00
|
|
|
]
|
2017-10-15 11:51:45 -04:00
|
|
|
nk = subproject('libnkutils', default_options: nk_options)
|
|
|
|
nk_subproject_options = nk.get_variable('nk_options')
|
|
|
|
foreach o : nk_options + nk_subproject_options
|
|
|
|
if not nk_options.contains(o) or not nk_subproject_options.contains(o)
|
|
|
|
error('You must not change libnkutils options @0@ != @1@'.format('|'.join(nk_options), '|'.join(nk_subproject_options)))
|
2017-05-27 20:18:09 -04:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
deps += nk.get_variable('libnkutils')
|
2018-07-10 07:03:52 -04:00
|
|
|
deps += nk.get_variable('libnkutils_bindings')
|
2017-05-04 07:45:11 -04:00
|
|
|
|
|
|
|
install_headers([
|
|
|
|
'include/mode.h',
|
|
|
|
'include/mode-private.h',
|
|
|
|
'include/helper.h',
|
2017-10-15 05:13:53 -04:00
|
|
|
'include/rofi-types.h',
|
2018-07-14 12:05:34 -04:00
|
|
|
'include/rofi-icon-fetcher.h'
|
2017-05-04 07:45:11 -04:00
|
|
|
],
|
|
|
|
subdir: meson.project_name(),
|
|
|
|
)
|
|
|
|
install_data(
|
|
|
|
'script/rofi-sensible-terminal',
|
|
|
|
'script/rofi-theme-selector',
|
|
|
|
install_dir: join_paths(get_option('prefix'), get_option('bindir'))
|
|
|
|
)
|
|
|
|
|
|
|
|
flex = generator(find_program('flex'),
|
|
|
|
output: '@BASENAME@.c',
|
|
|
|
arguments: [ '-o', '@OUTPUT@', '@INPUT@' ]
|
|
|
|
)
|
|
|
|
bison = generator(find_program('bison'),
|
|
|
|
output: [ '@BASENAME@.c', '@BASENAME@.h' ],
|
2019-04-19 04:09:25 -04:00
|
|
|
arguments: [ '-d', '@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@' ]
|
2017-05-04 07:45:11 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
rofi_sources = files(
|
|
|
|
'source/rofi.c',
|
|
|
|
'source/view.c',
|
|
|
|
'source/mode.c',
|
|
|
|
'source/keyb.c',
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/timings.c',
|
|
|
|
'source/history.c',
|
|
|
|
'source/theme.c',
|
2018-06-09 13:13:57 -04:00
|
|
|
'source/rofi-icon-fetcher.c',
|
2017-05-27 18:21:57 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'source/widgets/box.c',
|
2018-06-09 13:13:57 -04:00
|
|
|
'source/widgets/icon.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'source/widgets/container.c',
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/widgets/listview.c',
|
|
|
|
'source/widgets/scrollbar.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-31 18:12:03 -04:00
|
|
|
'source/xcb.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'source/dialogs/run.c',
|
|
|
|
'source/dialogs/ssh.c',
|
|
|
|
'source/dialogs/drun.c',
|
|
|
|
'source/dialogs/dmenu.c',
|
|
|
|
'source/dialogs/combi.c',
|
|
|
|
'source/dialogs/window.c',
|
|
|
|
'source/dialogs/script.c',
|
|
|
|
'source/dialogs/help-keys.c',
|
2017-06-01 08:55:17 -04:00
|
|
|
'include/display.h',
|
2017-05-04 07:45:11 -04:00
|
|
|
'include/xcb.h',
|
|
|
|
'include/xcb-internal.h',
|
|
|
|
'include/rofi.h',
|
|
|
|
'include/mode.h',
|
|
|
|
'include/mode-private.h',
|
|
|
|
'include/settings.h',
|
|
|
|
'include/keyb.h',
|
|
|
|
'include/view.h',
|
|
|
|
'include/view-internal.h',
|
2018-06-09 13:13:57 -04:00
|
|
|
'include/rofi-icon-fetcher.h',
|
2017-05-04 07:45:11 -04:00
|
|
|
'include/helper.h',
|
|
|
|
'include/helper-theme.h',
|
|
|
|
'include/timings.h',
|
|
|
|
'include/history.h',
|
|
|
|
'include/theme.h',
|
2017-06-20 15:02:13 -04:00
|
|
|
'include/rofi-types.h',
|
2017-05-27 18:21:57 -04:00
|
|
|
'include/css-colors.h',
|
2017-05-04 07:45:11 -04:00
|
|
|
'include/widgets/box.h',
|
2018-06-09 13:13:57 -04:00
|
|
|
'include/widgets/icon.h',
|
2017-05-04 07:45:11 -04:00
|
|
|
'include/widgets/container.h',
|
|
|
|
'include/widgets/widget.h',
|
|
|
|
'include/widgets/widget-internal.h',
|
|
|
|
'include/widgets/textbox.h',
|
|
|
|
'include/widgets/listview.h',
|
|
|
|
'include/widgets/scrollbar.h',
|
|
|
|
'include/xrmoptions.h',
|
|
|
|
'include/dialogs/ssh.h',
|
|
|
|
'include/dialogs/run.h',
|
|
|
|
'include/dialogs/drun.h',
|
|
|
|
'include/dialogs/dmenu.h',
|
|
|
|
'include/dialogs/combi.h',
|
|
|
|
'include/dialogs/script.h',
|
|
|
|
'include/dialogs/window.h',
|
|
|
|
'include/dialogs/dialogs.h',
|
|
|
|
'include/dialogs/help-keys.h',
|
2019-04-02 07:51:53 -04:00
|
|
|
'include/dialogs/dmenuscriptshared.h',
|
2017-05-04 07:45:11 -04:00
|
|
|
)
|
|
|
|
theme_lexer_sources = files('lexer/theme-lexer.l')
|
|
|
|
theme_parser_sources = files('lexer/theme-parser.y')
|
|
|
|
|
|
|
|
theme_lexer = flex.process(theme_lexer_sources)
|
|
|
|
theme_parser = bison.process(theme_parser_sources)
|
2017-10-31 13:16:08 -04:00
|
|
|
|
|
|
|
gnome = import('gnome')
|
|
|
|
default_theme = gnome.compile_resources('resources', files('resources/resources.xml'))
|
|
|
|
|
2017-05-04 07:45:11 -04:00
|
|
|
rofi = executable('rofi', rofi_sources + [
|
|
|
|
theme_lexer,
|
|
|
|
theme_parser,
|
2017-10-31 13:16:08 -04:00
|
|
|
default_theme,
|
2017-05-04 07:45:11 -04:00
|
|
|
],
|
|
|
|
dependencies: deps,
|
|
|
|
install: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
subdir('doc')
|
|
|
|
install_man(
|
|
|
|
'doc/rofi.1',
|
2017-11-05 09:28:17 -05:00
|
|
|
'doc/rofi-theme-selector.1',
|
2017-05-04 07:45:11 -04:00
|
|
|
'doc/rofi-sensible-terminal.1',
|
2017-08-04 10:50:51 -04:00
|
|
|
'doc/rofi-theme.5',
|
2017-05-04 07:45:11 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
install_data(
|
|
|
|
'themes/Adapta-Nokto.rasi',
|
|
|
|
'themes/Arc.rasi',
|
2018-02-25 09:18:37 -05:00
|
|
|
'themes/Arc-Dark.rasi',
|
2017-05-04 07:45:11 -04:00
|
|
|
'themes/DarkBlue.rasi',
|
2017-06-19 03:29:51 -04:00
|
|
|
'themes/Pop-Dark.rasi',
|
2017-05-04 07:45:11 -04:00
|
|
|
'themes/Indego.rasi',
|
|
|
|
'themes/Monokai.rasi',
|
|
|
|
'themes/Paper.rasi',
|
|
|
|
'themes/android_notification.rasi',
|
|
|
|
'themes/arthur.rasi',
|
|
|
|
'themes/blue.rasi',
|
|
|
|
'themes/c64.rasi',
|
2017-06-05 14:31:32 -04:00
|
|
|
'themes/dmenu.rasi',
|
2017-05-04 07:45:11 -04:00
|
|
|
'themes/glue_pro_blue.rasi',
|
2018-02-25 09:18:37 -05:00
|
|
|
'themes/gruvbox-common.rasi',
|
2017-05-04 07:45:11 -04:00
|
|
|
'themes/gruvbox-dark-hard.rasi',
|
|
|
|
'themes/gruvbox-dark-soft.rasi',
|
|
|
|
'themes/gruvbox-dark.rasi',
|
|
|
|
'themes/gruvbox-light-hard.rasi',
|
|
|
|
'themes/gruvbox-light-soft.rasi',
|
|
|
|
'themes/gruvbox-light.rasi',
|
|
|
|
'themes/lb.rasi',
|
|
|
|
'themes/paper-float.rasi',
|
|
|
|
'themes/purple.rasi',
|
|
|
|
'themes/sidebar.rasi',
|
|
|
|
'themes/solarized.rasi',
|
|
|
|
'themes/solarized_alternate.rasi',
|
2019-05-14 05:35:30 -04:00
|
|
|
'themes/fancy.rasi',
|
2017-05-04 07:45:11 -04:00
|
|
|
install_dir: themedir
|
|
|
|
)
|
|
|
|
|
2017-10-16 13:18:19 -04:00
|
|
|
pkg = import('pkgconfig')
|
|
|
|
|
2019-03-26 07:25:40 -04:00
|
|
|
pkg.generate(
|
|
|
|
filebase: 'rofi',
|
|
|
|
name: 'rofi',
|
|
|
|
version: meson.project_version(),
|
|
|
|
description: 'Header files for rofi plugins',
|
|
|
|
variables: [
|
|
|
|
'pluginsdir=@0@'.format(join_paths('${libdir}', meson.project_name())),
|
|
|
|
],
|
|
|
|
requires_private: plugins_deps,
|
2017-06-20 08:57:25 -04:00
|
|
|
)
|
2017-05-04 07:45:11 -04:00
|
|
|
|
|
|
|
|
|
|
|
test('history test', executable('history.test', [
|
|
|
|
'test/history-test.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/history.c',
|
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper_pidfile test', executable('helper_pidfile.test', [
|
|
|
|
'test/helper-pidfile.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
test('widget test', executable('widget.test', [
|
|
|
|
'test/widget-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/theme.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 18:21:57 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'source/helper.c',
|
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('box test', executable('box.test', [
|
|
|
|
'test/box-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/box.c',
|
|
|
|
'source/theme.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 18:21:57 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('scrollbar test', executable('scrollbar.test', [
|
|
|
|
'test/scrollbar-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/scrollbar.c',
|
|
|
|
'source/theme.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 18:21:57 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('textbox test', executable('textbox.test', [
|
|
|
|
'test/textbox-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/theme.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 18:21:57 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'source/helper.c',
|
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper test', executable('helper.test', [
|
|
|
|
'test/helper-test.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper_expand test', executable('helper_expand.test', [
|
|
|
|
'test/helper-expand.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper_config_cmdline_parser test', executable('helper_config_cmdline_parser.test', [
|
|
|
|
'test/helper-config-cmdline-parser.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
if check.found()
|
|
|
|
deps+= [ check ]
|
|
|
|
|
|
|
|
test('theme_parser test', executable('theme_parser.test', [
|
|
|
|
'test/theme-parser-test.c',
|
|
|
|
theme_lexer,
|
|
|
|
theme_parser,
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
|
|
|
'source/theme.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 18:21:57 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('mode test', executable('mode.test', [
|
|
|
|
'test/mode-test.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/dialogs/help-keys.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/mode.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 15:02:13 -04:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'source/keyb.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
2017-10-15 05:13:53 -04:00
|
|
|
|
|
|
|
test('helper_tokenize test', executable('helper_tokenize.test', [
|
|
|
|
'test/helper-tokenize.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
|
|
|
'source/rofi-types.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
2017-05-04 07:45:11 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2017-07-06 12:26:19 -04:00
|
|
|
run_target('test-x', command: [ 'test/run_all_tests.sh' ], depends: [ rofi ])
|
2017-05-04 07:45:11 -04:00
|
|
|
|
|
|
|
uncrustify = find_program('uncrustify', required: false)
|
|
|
|
if uncrustify.found()
|
|
|
|
run_target('indent',
|
|
|
|
command: [
|
|
|
|
uncrustify,
|
|
|
|
'-c', join_paths(meson.source_root(), 'data', 'uncrustify.cfg'),
|
2017-05-29 10:51:03 -04:00
|
|
|
'--replace',
|
2017-05-04 07:45:11 -04:00
|
|
|
rofi_sources
|
|
|
|
],
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
rofi_sources += theme_lexer_sources
|
|
|
|
rofi_sources += theme_parser_sources
|
|
|
|
|
|
|
|
cppcheck = find_program('cppcheck', required: false)
|
|
|
|
if cppcheck.found()
|
|
|
|
run_target('cppcheck',
|
|
|
|
command: [
|
|
|
|
cppcheck,
|
|
|
|
'--std=@0@'.format(get_option('c_std')),
|
|
|
|
'--platform=unix64',
|
|
|
|
'--enable=all',
|
|
|
|
'-Uerror_dialog',
|
|
|
|
'--inconclusive',
|
|
|
|
'-I@0@'.format(join_paths(meson.source_root(), 'include')),
|
|
|
|
rofi_sources
|
|
|
|
],
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ohcount = find_program('ohcount', required: false)
|
|
|
|
if ohcount.found()
|
|
|
|
run_target('ohcount',
|
|
|
|
command: [
|
|
|
|
ohcount,
|
|
|
|
rofi_sources
|
|
|
|
],
|
|
|
|
)
|
|
|
|
endif
|