blueprint-compiler/meson.build
James Westman 6f4d458855
build: Install to datadir
Install the python module to the data directory, not the python install
directory that meson gives us. Then, in the main script, try to find the
module and add it to the path by assuming the script is installed to
(prefix)/bin. Hopefully this will fix the ModuleNotFound errors.
2022-06-07 11:52:55 -05:00

32 lines
777 B
Meson

project('blueprint-compiler',
version: '0.1.0',
)
subdir('docs')
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
py = import('python').find_installation('python3')
configure_file(
input: 'blueprint-compiler.pc.in',
output: 'blueprint-compiler.pc',
configuration: { 'VERSION': meson.project_version() },
install: not meson.is_subproject(),
install_dir: join_paths(datadir, 'pkgconfig'),
)
install_data(
'blueprint-compiler.py',
install_dir: get_option('bindir'),
rename: 'blueprint-compiler',
)
meson.override_find_program('blueprint-compiler', find_program('blueprint-compiler.py'))
if not meson.is_subproject()
install_subdir('blueprintcompiler', install_dir: datadir / 'blueprint-compiler')
endif
subdir('tests')