2020-02-29 17:14:55 -05:00
|
|
|
project('wofi', 'c', version : 'v1.1', default_options : ['buildtype=release', 'warning_level=2'])
|
2019-12-20 21:29:11 -05:00
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
|
|
|
inc = include_directories('inc')
|
|
|
|
gtk = dependency('gtk+-3.0')
|
|
|
|
threads = dependency('threads')
|
|
|
|
wayland = dependency('wayland-client')
|
|
|
|
dl = cc.find_library('dl')
|
|
|
|
|
2019-12-30 21:35:26 -05:00
|
|
|
hg = find_program('hg', native : true, required : false)
|
|
|
|
|
2020-02-29 01:02:10 -05:00
|
|
|
version = meson.project_version()
|
2019-12-30 21:35:26 -05:00
|
|
|
|
|
|
|
if hg.found()
|
|
|
|
version = run_command(hg, 'identify').stdout().strip()
|
|
|
|
endif
|
|
|
|
|
|
|
|
add_project_arguments('-D_GNU_SOURCE', '-DVERSION="' + version + '"', language : 'c')
|
2019-12-20 21:29:11 -05:00
|
|
|
add_project_link_arguments('-rdynamic', language : 'c')
|
|
|
|
|
2020-01-28 17:05:01 -05:00
|
|
|
sources = ['src/config.c',
|
|
|
|
'src/main.c',
|
|
|
|
'src/map.c',
|
|
|
|
'src/property_box.c',
|
|
|
|
'src/utils.c',
|
|
|
|
'src/wofi.c',
|
|
|
|
'proto/wlr-layer-shell-unstable-v1-protocol.c',
|
2020-02-25 20:14:42 -05:00
|
|
|
'proto/xdg-output-unstable-v1-protocol.c',
|
2020-01-28 17:05:01 -05:00
|
|
|
'proto/xdg-shell-protocol.c']
|
|
|
|
|
|
|
|
deps = [gtk, threads, wayland, dl]
|
|
|
|
|
|
|
|
if get_option('enable_run')
|
2020-02-29 01:04:49 -05:00
|
|
|
sources += 'modes/run.c'
|
2020-01-28 17:05:01 -05:00
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('enable_drun')
|
2020-02-29 01:04:49 -05:00
|
|
|
sources += 'modes/drun.c'
|
|
|
|
deps += dependency('gio-unix-2.0')
|
2020-01-28 17:05:01 -05:00
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('enable_dmenu')
|
2020-02-29 01:04:49 -05:00
|
|
|
sources += 'modes/dmenu.c'
|
2020-01-28 17:05:01 -05:00
|
|
|
endif
|
|
|
|
|
2020-02-26 02:06:00 -05:00
|
|
|
install_man('man/wofi.1',
|
|
|
|
'man/wofi.3',
|
|
|
|
'man/wofi.5',
|
|
|
|
'man/wofi.7',
|
|
|
|
'man/wofi-api.3',
|
|
|
|
'man/wofi-config.3',
|
|
|
|
'man/wofi-keys.7',
|
|
|
|
'man/wofi-map.3',
|
|
|
|
'man/wofi-utils.3')
|
|
|
|
|
2020-02-29 17:14:55 -05:00
|
|
|
executable(meson.project_name(), sources, include_directories : inc, dependencies : deps, install : true)
|