Skip to content

Commit

Permalink
build: support explict docdir specification
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Jan 2, 2025
1 parent cfd7303 commit b72cb55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,14 @@ subdir('examples')

if root
datadir = get_option('datadir')
docdir = get_option('docdir')
if docdir == ''
docdir = datadir / 'doc' / meson.project_name()
endif

install_subdir(
'docs',
install_dir: datadir / 'doc' / meson.project_name(),
install_dir: docdir,
strip_directory: true,
)
endif
2 changes: 2 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ option(
value: 'auto',
description: 'Build examples',
)

option('docdir', type: 'string', description: 'documentation directory')

0 comments on commit b72cb55

Please sign in to comment.