Add more options to the meson

This commit is contained in:
Jacob 2023-07-27 19:01:12 +02:00
parent 8c81603247
commit 32418e80e8
2 changed files with 31 additions and 13 deletions

View file

@ -94,18 +94,32 @@ project_target = executable(
c_args : build_args, c_args : build_args,
) )
install_man('spmenu.1') if get_option('man') and get_option('docs')
install_man('spmenu_run.1') install_man('spmenu.1')
install_man('spmenu_test.1') install_man('spmenu_test.1')
install_data(sources : 'docs/spmenu.conf', install_dir : 'share/spmenu')
install_data(sources : 'docs/spmenu_run.desktop', install_dir : 'share/applications') if get_option('run') and get_option('docs')
install_data(sources : 'docs/spmenu_desktop.desktop', install_dir : 'share/applications') install_man('spmenu_run.1')
install_data(sources : 'docs/spmenu_filemanager.desktop', install_dir : 'share/applications') endif
install_data(sources : 'docs/spmenu.svg', install_dir : 'share/icons/hicolor/scalable/apps') endif
install_data(sources : 'scripts/spmenu_run', install_dir : 'bin')
install_data(sources : 'scripts/spmenu_path', install_dir : 'bin') if get_option('docs')
install_data(sources : 'scripts/spmenu_fm', install_dir : 'bin') install_data(sources : 'docs/spmenu.conf', install_dir : 'share/spmenu')
install_data(sources : 'scripts/spmenu_desktop', install_dir : 'bin') install_data(sources : 'docs/spmenu_run.desktop', install_dir : 'share/applications')
install_data(sources : 'scripts/spmenu_test', install_dir : 'bin') install_data(sources : 'docs/spmenu_desktop.desktop', install_dir : 'share/applications')
install_data(sources : 'docs/spmenu_filemanager.desktop', install_dir : 'share/applications')
install_data(sources : 'docs/spmenu.svg', install_dir : 'share/icons/hicolor/scalable/apps')
endif
if get_option('run')
install_data(sources : 'scripts/spmenu_run', install_dir : 'bin')
install_data(sources : 'scripts/spmenu_path', install_dir : 'bin')
install_data(sources : 'scripts/spmenu_fm', install_dir : 'bin')
install_data(sources : 'scripts/spmenu_desktop', install_dir : 'bin')
endif
if get_option('test')
install_data(sources : 'scripts/spmenu_test', install_dir : 'bin')
endif
test('spmenu', project_target) test('spmenu', project_target)

View file

@ -7,3 +7,7 @@ option('xresources', type : 'boolean', value : true, description : 'Enable .Xres
option('fribidi', type : 'boolean', value : true, description : 'Enable Right-to-left language support') option('fribidi', type : 'boolean', value : true, description : 'Enable Right-to-left language support')
option('libconfig', type : 'boolean', value : true, description : 'Enable configuration file support') option('libconfig', type : 'boolean', value : true, description : 'Enable configuration file support')
option('regex', type : 'boolean', value : true, description : 'Enable regex matching') option('regex', type : 'boolean', value : true, description : 'Enable regex matching')
option('run', type : 'boolean', value : true, description : 'Install spmenu_run')
option('test', type : 'boolean', value : true, description : 'Install spmenu_test')
option('man', type : 'boolean', value : true, description : 'Install man page')
option('docs', type : 'boolean', value : true, description : 'Install documentation')