2017-05-04 07:45:11 -04:00
|
|
|
project('rofi', 'c',
|
2022-08-19 16:43:47 -04:00
|
|
|
version: '1.7.5-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',
|
2023-06-29 17:59:25 -04:00
|
|
|
'warning_level=3'
|
2017-05-04 07:45:11 -04:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
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')),
|
2020-10-12 14:32:25 -04:00
|
|
|
'-D_DEFAULT_SOURCE=1',
|
2017-05-04 16:02:57 -04:00
|
|
|
language: 'c'
|
|
|
|
)
|
|
|
|
|
|
|
|
flags = [
|
|
|
|
'-Wparentheses',
|
|
|
|
'-Winline',
|
|
|
|
'-Wunreachable-code',
|
|
|
|
'-Werror=missing-prototypes',
|
2024-02-16 12:41:07 -05:00
|
|
|
'-Wno-overlength-strings',
|
2023-06-29 17:59:25 -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
|
|
|
|
|
2022-11-17 06:13:14 -05:00
|
|
|
if get_option('b_lto')
|
2022-11-17 05:25:45 -05:00
|
|
|
add_project_arguments('-Werror=odr', language: 'c')
|
|
|
|
add_project_arguments('-Werror=lto-type-mismatch', language: 'c')
|
|
|
|
add_project_arguments('-Werror=strict-aliasing', language: 'c')
|
|
|
|
endif
|
|
|
|
|
2022-05-25 11:52:14 -04:00
|
|
|
plugindir = join_paths(get_option('libdir'), meson.project_name())
|
|
|
|
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
|
|
|
|
desktop_install_dir = join_paths(get_option('datadir'), 'applications')
|
|
|
|
icondir = join_paths(get_option('datadir'), 'icons','hicolor', 'scalable', 'apps')
|
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
|
|
|
]
|
|
|
|
|
2021-02-18 04:41:46 -05:00
|
|
|
dep_lm = c_compiler.find_library('m', required : false)
|
2021-02-18 02:04:50 -05:00
|
|
|
|
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'),
|
2020-10-20 14:38:13 -04:00
|
|
|
dependency('gdk-pixbuf-2.0'),
|
2021-02-18 02:04:50 -05:00
|
|
|
dep_lm,
|
2017-05-04 07:45:11 -04:00
|
|
|
]
|
|
|
|
|
2020-08-01 05:28:48 -04:00
|
|
|
|
2021-01-20 09:19:03 -05:00
|
|
|
libgwater = subproject('libgwater')
|
2017-05-04 07:45:11 -04:00
|
|
|
# XCB stuff
|
|
|
|
deps += [
|
2021-01-20 09:19:03 -05:00
|
|
|
libgwater.get_variable('libgwater_xcb'),
|
|
|
|
dependency('xcb'),
|
2017-05-04 07:45:11 -04:00
|
|
|
dependency('xcb-aux'),
|
|
|
|
dependency('xcb-xkb'),
|
|
|
|
dependency('xkbcommon-x11'),
|
|
|
|
dependency('xcb-ewmh'),
|
|
|
|
dependency('xcb-icccm'),
|
|
|
|
dependency('xcb-randr'),
|
2021-05-22 18:17:27 -04:00
|
|
|
dependency('xcb-cursor'),
|
2017-05-04 07:45:11 -04:00
|
|
|
dependency('xcb-xinerama'),
|
|
|
|
dependency('cairo-xcb'),
|
|
|
|
dependency('libstartup-notification-1.0'),
|
|
|
|
]
|
|
|
|
|
2022-11-15 11:18:51 -05:00
|
|
|
header_conf = configuration_data()
|
|
|
|
if get_option('imdkit')
|
|
|
|
imdkit_new = dependency('xcb-imdkit', version: '>= 1.0.3', required: false)
|
|
|
|
imdkit_old = dependency('xcb-imdkit', version: '<= 1.0.2', required: false)
|
|
|
|
if imdkit_new.found()
|
|
|
|
deps += imdkit_new
|
|
|
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
|
|
|
|
header_conf.set('XCB_IMDKIT', true)
|
|
|
|
elif imdkit_old.found()
|
|
|
|
deps+= imdkit_old
|
|
|
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', true)
|
|
|
|
header_conf.set('XCB_IMDKIT', true)
|
|
|
|
else
|
|
|
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
|
|
|
|
header_conf.set('XCB_IMDKIT', false)
|
|
|
|
endif
|
|
|
|
endif
|
2022-11-08 13:18:45 -05:00
|
|
|
|
2017-05-04 07:45:11 -04:00
|
|
|
|
2022-11-08 13:18:45 -05:00
|
|
|
check = dependency('check', version: '>= 0.11.0', required: get_option('check'))
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-04 07:45:11 -04:00
|
|
|
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/')
|
2022-11-11 15:53:20 -05:00
|
|
|
header_conf.set_quoted('PACKAGE_URL', 'https://github.com/davatorium/rofi/discussions')
|
2017-05-04 07:45:11 -04:00
|
|
|
|
|
|
|
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-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
|
2022-02-26 10:58:56 -05:00
|
|
|
if ( o.startswith('git-work-tree=') )
|
|
|
|
continue
|
|
|
|
elif not nk_options.contains(o) or not nk_subproject_options.contains(o)
|
2017-10-15 11:51:45 -04:00
|
|
|
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'))
|
|
|
|
)
|
|
|
|
|
2022-05-25 11:52:14 -04:00
|
|
|
install_data(
|
|
|
|
'data/rofi-theme-selector.desktop',
|
|
|
|
'data/rofi.desktop',
|
|
|
|
install_dir: desktop_install_dir
|
|
|
|
)
|
|
|
|
install_data(
|
|
|
|
'data/rofi.svg',
|
|
|
|
install_dir: icondir
|
|
|
|
)
|
|
|
|
|
2017-05-04 07:45:11 -04:00
|
|
|
flex = generator(find_program('flex'),
|
|
|
|
output: '@BASENAME@.c',
|
|
|
|
arguments: [ '-o', '@OUTPUT@', '@INPUT@' ]
|
|
|
|
)
|
|
|
|
bison = generator(find_program('bison'),
|
|
|
|
output: [ '@BASENAME@.c', '@BASENAME@.h' ],
|
2022-04-14 16:50:38 -04:00
|
|
|
arguments: [ '--report=all', '--report-file=bison.log', '-Wall', '--verbose', '-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',
|
2022-02-23 17:18:53 -05:00
|
|
|
'source/modes/run.c',
|
|
|
|
'source/modes/ssh.c',
|
|
|
|
'source/modes/drun.c',
|
|
|
|
'source/modes/dmenu.c',
|
|
|
|
'source/modes/combi.c',
|
|
|
|
'source/modes/window.c',
|
|
|
|
'source/modes/script.c',
|
|
|
|
'source/modes/help-keys.c',
|
|
|
|
'source/modes/filebrowser.c',
|
2023-06-12 13:07:00 -04:00
|
|
|
'source/modes/recursivebrowser.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',
|
2022-02-23 17:18:53 -05:00
|
|
|
'include/modes/ssh.h',
|
|
|
|
'include/modes/run.h',
|
|
|
|
'include/modes/drun.h',
|
|
|
|
'include/modes/dmenu.h',
|
|
|
|
'include/modes/combi.h',
|
|
|
|
'include/modes/script.h',
|
|
|
|
'include/modes/window.h',
|
|
|
|
'include/modes/modes.h',
|
|
|
|
'include/modes/help-keys.h',
|
|
|
|
'include/modes/filebrowser.h',
|
|
|
|
'include/modes/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',
|
2020-09-19 10:49:50 -04:00
|
|
|
'doc/rofi-script.5',
|
2017-08-04 10:50:51 -04:00
|
|
|
'doc/rofi-theme.5',
|
2022-04-11 05:19:34 -04:00
|
|
|
'doc/rofi-debugging.5',
|
2021-12-17 05:13:29 -05:00
|
|
|
'doc/rofi-dmenu.5',
|
2021-12-15 15:31:44 -05:00
|
|
|
'doc/rofi-keys.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',
|
|
|
|
'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',
|
2021-02-14 07:31:47 -05:00
|
|
|
'themes/docu.rasi',
|
2017-05-04 07:45:11 -04:00
|
|
|
'themes/glue_pro_blue.rasi',
|
2022-12-30 05:54:15 -05:00
|
|
|
'themes/gruvbox-common.rasinc',
|
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',
|
2022-06-27 10:56:59 -04:00
|
|
|
'themes/sidebar-v2.rasi',
|
2017-05-04 07:45:11 -04:00
|
|
|
'themes/solarized.rasi',
|
|
|
|
'themes/solarized_alternate.rasi',
|
2019-05-14 05:35:30 -04:00
|
|
|
'themes/fancy.rasi',
|
2022-12-31 17:54:14 -05:00
|
|
|
'themes/fancy2.rasi',
|
2021-08-17 06:04:16 -04:00
|
|
|
'themes/iggy.rasi',
|
2022-12-31 17:21:03 -05:00
|
|
|
'themes/material.rasi',
|
2021-08-17 06:04:16 -04:00
|
|
|
'themes/iggy.jpg',
|
2023-01-09 18:48:52 -05:00
|
|
|
'themes/fullscreen-preview.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',
|
2021-06-01 08:21:21 -04:00
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'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,
|
2021-08-24 12:19:25 -04:00
|
|
|
default_theme,
|
2017-05-04 07:45:11 -04:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.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,
|
2021-08-24 12:19:25 -04:00
|
|
|
default_theme,
|
2017-05-04 07:45:11 -04:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/box.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.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,
|
2021-08-24 12:19:25 -04:00
|
|
|
default_theme,
|
2017-05-04 07:45:11 -04:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/scrollbar.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.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,
|
2021-08-24 12:19:25 -04:00
|
|
|
default_theme,
|
2017-05-04 07:45:11 -04:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.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',
|
2021-06-01 08:21:21 -04:00
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'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',
|
2021-06-01 08:21:21 -04:00
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'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',
|
2021-06-01 08:21:21 -04:00
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'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,
|
2021-08-24 12:22:46 -04:00
|
|
|
default_theme,
|
2017-05-04 07:45:11 -04:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.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',
|
2022-02-23 17:18:53 -05:00
|
|
|
'source/modes/help-keys.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'source/helper.c',
|
2021-06-05 06:58:07 -04:00
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.c',
|
2017-05-04 07:45:11 -04:00
|
|
|
'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',
|
2021-06-05 06:58:07 -04:00
|
|
|
'source/theme.c',
|
2021-09-20 13:57:12 -04:00
|
|
|
'source/css-colors.c',
|
2017-10-15 05:13:53 -04:00
|
|
|
'source/xrmoptions.c',
|
|
|
|
'source/rofi-types.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
2017-05-04 07:45:11 -04: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
|