Skip to content

Commit

Permalink
Make plugins and tests optional (vala-lang#194)
Browse files Browse the repository at this point in the history
This makes it easier to build VLS from `makepkg`
  • Loading branch information
taozuhong authored Jun 29, 2021
1 parent 8699e57 commit 2492ba8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ else
endif

subdir('data')
subdir('plugins/gnome-builder')
subdir('src')
subdir('test')

if get_option('plugins')
subdir('plugins/gnome-builder')
endif

if get_option('tests')
subdir('test')
endif
2 changes: 2 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ option('active_parameter', type: 'boolean', value: false, description: 'Support
option('debug_mem', type: 'boolean', value: false, description: 'Debug memory usage')
option('builder_abi', type: 'string', value: 'auto', description: 'Builder ABI version. Use a value like \'3.38\'')
option('man_pages', type: 'feature', value: 'auto', description: 'Generate and install man pages.')
option('plugins', type: 'boolean', value: 'true', description: 'Install plugins.')
option('tests', type: 'boolean', value: 'true', description: 'Build tests.')
3 changes: 1 addition & 2 deletions plugins/gnome-builder/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ if builder_abi == 'auto'
# attempt to guess the correct ABI from the installed GNOME Builder
sh = find_program('sh', native: true, required: false)
sed = find_program('sed', native: true, required: false)
gnome_builder = find_program('gnome-builder',
dirs: [get_option('prefix') / get_option('libdir')], native: true, required: false)
gnome_builder = find_program('gnome-builder', native: true, required: false)
if gnome_builder.found() and sed.found() and sh.found()
r = run_command(sh, 'get_builder_abi.sh', gnome_builder, sed, check: true)
builder_abi = r.stdout().strip()
Expand Down

0 comments on commit 2492ba8

Please sign in to comment.