2017-05-04 11:45:11 +00:00
|
|
|
project('rofi', 'c',
|
2022-01-29 12:23:05 +00:00
|
|
|
version: '1.7.3',
|
2018-07-10 11:03:52 +00:00
|
|
|
meson_version: '>=0.47.0',
|
2017-05-04 11:45:11 +00:00
|
|
|
license: [ 'MIT' ],
|
|
|
|
default_options: [
|
|
|
|
'c_std=c99',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
c_compiler = meson.get_compiler('c')
|
|
|
|
|
2017-05-04 20:02:57 +00:00
|
|
|
add_project_arguments(
|
|
|
|
'-I@0@'.format(meson.build_root()),
|
|
|
|
'-I@0@'.format(join_paths(meson.source_root(), 'include')),
|
2020-10-12 18:32:25 +00:00
|
|
|
'-D_DEFAULT_SOURCE=1',
|
2017-05-04 20:02:57 +00:00
|
|
|
language: 'c'
|
|
|
|
)
|
|
|
|
|
|
|
|
flags = [
|
|
|
|
'-Wparentheses',
|
|
|
|
'-Winline',
|
|
|
|
'-Wunreachable-code',
|
|
|
|
'-Werror=missing-prototypes',
|
2019-04-19 08:09:01 +00:00
|
|
|
'-Wno-inline', # A bit too noisy with Bison…
|
2017-05-04 20:02:57 +00:00
|
|
|
]
|
|
|
|
foreach f : flags
|
|
|
|
if c_compiler.has_argument(f)
|
|
|
|
add_project_arguments(f, language: 'c')
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2019-03-26 11:25:40 +00:00
|
|
|
plugindir = join_paths(get_option('libdir'), meson.project_name())
|
|
|
|
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
|
2017-05-04 11:45:11 +00:00
|
|
|
|
2019-04-19 08:15:06 +00:00
|
|
|
glib_min_major=2
|
|
|
|
glib_min_minor=40
|
|
|
|
glib_min_version='@0@.@1@'.format(glib_min_major, glib_min_minor)
|
2019-03-26 11:25:40 +00:00
|
|
|
plugins_deps = [
|
2019-04-19 08:15:06 +00:00
|
|
|
dependency('glib-2.0', version: '>= @0@'.format(glib_min_version)),
|
2017-05-04 11:45:11 +00:00
|
|
|
dependency('gmodule-2.0'),
|
|
|
|
dependency('cairo'),
|
2019-03-26 11:25:40 +00:00
|
|
|
]
|
|
|
|
|
2021-02-18 09:41:46 +00:00
|
|
|
dep_lm = c_compiler.find_library('m', required : false)
|
2021-02-18 07:04:50 +00:00
|
|
|
|
2019-03-26 11:25:40 +00:00
|
|
|
deps = [
|
|
|
|
plugins_deps,
|
|
|
|
dependency('gio-unix-2.0'),
|
2017-05-04 11:45:11 +00:00
|
|
|
dependency('pango'),
|
|
|
|
dependency('pangocairo'),
|
2017-05-28 00:18:09 +00:00
|
|
|
dependency('xkbcommon'),
|
2020-10-20 18:38:13 +00:00
|
|
|
dependency('gdk-pixbuf-2.0'),
|
2021-02-18 07:04:50 +00:00
|
|
|
dep_lm,
|
2017-05-04 11:45:11 +00:00
|
|
|
]
|
|
|
|
|
2020-08-01 09:28:48 +00:00
|
|
|
|
2021-01-20 14:19:03 +00:00
|
|
|
libgwater = subproject('libgwater')
|
2017-05-04 11:45:11 +00:00
|
|
|
# XCB stuff
|
|
|
|
deps += [
|
2021-01-20 14:19:03 +00:00
|
|
|
libgwater.get_variable('libgwater_xcb'),
|
|
|
|
dependency('xcb'),
|
2017-05-04 11:45:11 +00:00
|
|
|
dependency('xcb-aux'),
|
|
|
|
dependency('xcb-xkb'),
|
|
|
|
dependency('xkbcommon-x11'),
|
|
|
|
dependency('xcb-ewmh'),
|
|
|
|
dependency('xcb-icccm'),
|
|
|
|
dependency('xcb-randr'),
|
2021-05-22 22:17:27 +00:00
|
|
|
dependency('xcb-cursor'),
|
2017-05-04 11:45:11 +00:00
|
|
|
dependency('xcb-xinerama'),
|
|
|
|
dependency('cairo-xcb'),
|
|
|
|
dependency('libstartup-notification-1.0'),
|
|
|
|
]
|
|
|
|
|
2019-03-26 11:10:09 +00:00
|
|
|
check = dependency('check', version: '>= 0.11.0', required: get_option('check'))
|
2017-05-04 11:45:11 +00: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 10:46:51 +00:00
|
|
|
header_conf.set_quoted('VERSION', meson.project_version())
|
2017-05-04 11:45:11 +00:00
|
|
|
header_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
2019-05-14 09:55:30 +00:00
|
|
|
header_conf.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/davatorium/rofi/')
|
2017-05-04 11:45:11 +00:00
|
|
|
header_conf.set_quoted('PACKAGE_URL', 'https://reddit.com/r/qtools/')
|
|
|
|
|
|
|
|
header_conf.set('_GNU_SOURCE', true)
|
|
|
|
|
2017-10-15 15:51:45 +00:00
|
|
|
header_conf.set('USE_NK_GIT_VERSION', true)
|
2017-05-04 11:45:11 +00:00
|
|
|
|
2019-04-19 08:15:06 +00: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 11:10:09 +00:00
|
|
|
header_conf.set('ENABLE_DRUN', get_option('drun'))
|
|
|
|
header_conf.set('WINDOW_MODE', get_option('window'))
|
2017-05-04 11:45:11 +00: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 11:25:40 +00: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 11:45:11 +00:00
|
|
|
|
|
|
|
config_h = configure_file(output: 'config.h', configuration: header_conf)
|
|
|
|
|
2017-10-15 15:51:45 +00:00
|
|
|
nk_options = [
|
2017-05-28 00:18:09 +00:00
|
|
|
'bindings=true',
|
2017-04-12 16:08:57 +00:00
|
|
|
'xdg-theme=true',
|
2017-10-15 16:29:54 +00:00
|
|
|
'git-work-tree=@0@'.format(meson.source_root()),
|
2017-05-28 00:18:09 +00:00
|
|
|
]
|
2017-10-15 15:51:45 +00: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-28 00:18:09 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
deps += nk.get_variable('libnkutils')
|
2018-07-10 11:03:52 +00:00
|
|
|
deps += nk.get_variable('libnkutils_bindings')
|
2017-05-04 11:45:11 +00:00
|
|
|
|
|
|
|
install_headers([
|
|
|
|
'include/mode.h',
|
|
|
|
'include/mode-private.h',
|
|
|
|
'include/helper.h',
|
2017-10-15 09:13:53 +00:00
|
|
|
'include/rofi-types.h',
|
2018-07-14 16:05:34 +00:00
|
|
|
'include/rofi-icon-fetcher.h'
|
2017-05-04 11:45:11 +00: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' ],
|
2021-09-01 19:27:25 +00:00
|
|
|
arguments: [ '--verbose', '-d', '@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@' ]
|
2017-05-04 11:45:11 +00: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 17:13:57 +00:00
|
|
|
'source/rofi-icon-fetcher.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/widgets/box.c',
|
2018-06-09 17:13:57 +00:00
|
|
|
'source/widgets/icon.c',
|
2017-05-04 11:45:11 +00: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 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-31 22:12:03 +00:00
|
|
|
'source/xcb.c',
|
2017-05-04 11:45:11 +00: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',
|
2020-10-12 18:17:21 +00:00
|
|
|
'source/dialogs/filebrowser.c',
|
2017-06-01 12:55:17 +00:00
|
|
|
'include/display.h',
|
2017-05-04 11:45:11 +00: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 17:13:57 +00:00
|
|
|
'include/rofi-icon-fetcher.h',
|
2017-05-04 11:45:11 +00:00
|
|
|
'include/helper.h',
|
|
|
|
'include/helper-theme.h',
|
|
|
|
'include/timings.h',
|
|
|
|
'include/history.h',
|
|
|
|
'include/theme.h',
|
2017-06-20 19:02:13 +00:00
|
|
|
'include/rofi-types.h',
|
2017-05-27 22:21:57 +00:00
|
|
|
'include/css-colors.h',
|
2017-05-04 11:45:11 +00:00
|
|
|
'include/widgets/box.h',
|
2018-06-09 17:13:57 +00:00
|
|
|
'include/widgets/icon.h',
|
2017-05-04 11:45:11 +00: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',
|
2020-10-12 18:17:21 +00:00
|
|
|
'include/dialogs/filebrowser.h',
|
2019-04-02 11:51:53 +00:00
|
|
|
'include/dialogs/dmenuscriptshared.h',
|
2017-05-04 11:45:11 +00: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 17:16:08 +00:00
|
|
|
|
|
|
|
gnome = import('gnome')
|
|
|
|
default_theme = gnome.compile_resources('resources', files('resources/resources.xml'))
|
|
|
|
|
2017-05-04 11:45:11 +00:00
|
|
|
rofi = executable('rofi', rofi_sources + [
|
|
|
|
theme_lexer,
|
|
|
|
theme_parser,
|
2017-10-31 17:16:08 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
dependencies: deps,
|
|
|
|
install: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
subdir('doc')
|
|
|
|
install_man(
|
|
|
|
'doc/rofi.1',
|
2017-11-05 14:28:17 +00:00
|
|
|
'doc/rofi-theme-selector.1',
|
2017-05-04 11:45:11 +00:00
|
|
|
'doc/rofi-sensible-terminal.1',
|
2020-09-19 14:49:50 +00:00
|
|
|
'doc/rofi-script.5',
|
2017-08-04 14:50:51 +00:00
|
|
|
'doc/rofi-theme.5',
|
2021-12-17 10:13:29 +00:00
|
|
|
'doc/rofi-dmenu.5',
|
2021-12-15 20:31:44 +00:00
|
|
|
'doc/rofi-keys.5',
|
2017-05-04 11:45:11 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
install_data(
|
|
|
|
'themes/Adapta-Nokto.rasi',
|
|
|
|
'themes/Arc.rasi',
|
2018-02-25 14:18:37 +00:00
|
|
|
'themes/Arc-Dark.rasi',
|
2017-05-04 11:45:11 +00:00
|
|
|
'themes/DarkBlue.rasi',
|
2017-06-19 07:29:51 +00:00
|
|
|
'themes/Pop-Dark.rasi',
|
2017-05-04 11:45:11 +00: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 18:31:32 +00:00
|
|
|
'themes/dmenu.rasi',
|
2021-02-14 12:31:47 +00:00
|
|
|
'themes/docu.rasi',
|
2017-05-04 11:45:11 +00:00
|
|
|
'themes/glue_pro_blue.rasi',
|
2018-02-25 14:18:37 +00:00
|
|
|
'themes/gruvbox-common.rasi',
|
2017-05-04 11:45:11 +00: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 09:35:30 +00:00
|
|
|
'themes/fancy.rasi',
|
2021-08-17 10:04:16 +00:00
|
|
|
'themes/iggy.rasi',
|
|
|
|
'themes/iggy.jpg',
|
2017-05-04 11:45:11 +00:00
|
|
|
install_dir: themedir
|
|
|
|
)
|
|
|
|
|
2017-10-16 17:18:19 +00:00
|
|
|
pkg = import('pkgconfig')
|
|
|
|
|
2019-03-26 11:25:40 +00: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 12:57:25 +00:00
|
|
|
)
|
2017-05-04 11:45:11 +00: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',
|
2021-06-01 12:21:21 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
test('widget test', executable('widget.test', [
|
|
|
|
'test/widget-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
2021-08-24 16:19:25 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('box test', executable('box.test', [
|
|
|
|
'test/box-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
2021-08-24 16:19:25 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/box.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('scrollbar test', executable('scrollbar.test', [
|
|
|
|
'test/scrollbar-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
2021-08-24 16:19:25 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/scrollbar.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('textbox test', executable('textbox.test', [
|
|
|
|
'test/textbox-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
2021-08-24 16:19:25 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00: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',
|
2021-06-01 12:21:21 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper_expand test', executable('helper_expand.test', [
|
|
|
|
'test/helper-expand.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
2021-06-01 12:21:21 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00: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',
|
2021-06-01 12:21:21 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00: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,
|
2021-08-24 16:22:46 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00: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',
|
2021-06-05 10:58:07 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/mode.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/keyb.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
2017-10-15 09:13:53 +00:00
|
|
|
|
|
|
|
test('helper_tokenize test', executable('helper_tokenize.test', [
|
|
|
|
'test/helper-tokenize.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
2021-06-05 10:58:07 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-10-15 09:13:53 +00:00
|
|
|
'source/xrmoptions.c',
|
|
|
|
'source/rofi-types.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
2017-05-04 11:45:11 +00:00
|
|
|
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
|