Skip to content

Commit

Permalink
bin/ First pass at meson build
Browse files Browse the repository at this point in the history
This involves a lot of configuring files with various shebangs.

We're probably really over-complicating this.
  • Loading branch information
Kangie committed Apr 5, 2024
1 parent e1b514b commit 9fd99c9
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions bin/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
perl_config = configuration_data()
perl_config.set('PERL', perl.full_path())
perl_config.set_quoted('VERSION', meson.project_version())
perl_config.set_quoted('datadir', datadir + '/' + meson.project_name())
perl_config.set_quoted('datarootdir', datadir)
perl_config.set_quoted('FVWM_PERLLIBDIR', datadir + '/' + meson.project_name() + '/perllib')
perl_config.set_quoted('prefix', prefix)
perl_config.set_quoted('SED', find_program('sed').full_path())
perl_config.set_quoted('VERSIONINFO', meson.project_version())

python_config = configuration_data()
# Since we only support python3 now anyway, we should consider dropping this.
python_config.set('PYTHON', py.full_path())
python_config.set_quoted('VERSION', meson.project_version())

# We only install FvwmCommand for non-golang builds.
# Since this isn't currently configurable, we'll just check for the presence of golang
# at build time. Not ideal, but we should probably drop FvwmCommand anyway.
if golang.found()
subdir('FvwmPrompt')
else
FvwmCommand = configure_file(
input: 'FvwmCommand.in',
output: 'FvwmCommand',
configuration: python_config,
install: true,
install_dir: bindir,
)
endif

# We should tighten up the dependencies here, but for now we'll just use all_found_deps.
fvwm_root = executable('fvwm-root',
'fvwm-root.c',
include_directories: [lib_includes, fvwm_includes],
link_with: libraries,
dependencies: all_found_deps)

fvwm_perllib = configure_file(
input: 'fvwm-perllib.in',
output: 'fvwm-perllib',
configuration: perl_config,
install: true,
install_dir: bindir,
)

fvwm_convert = configure_file(
input: 'fvwm-convert-2.6.in',
output: 'fvwm-convert-2.6',
configuration: perl_config,
install: true,
install_dir: bindir,
)

fvwm_menu_xlock = configure_file(
input: 'fvwm-menu-xlock.in',
output: 'fvwm-menu-xlock',
configuration: perl_config,
install: true,
install_dir: bindir,
)

fvwm_menu_directory = configure_file(
input: 'fvwm-menu-directory.in',
output: 'fvwm-menu-directory',
configuration: perl_config,
install: true,
install_dir: bindir,
)

fvwm_menu_desktop = configure_file(
input: 'fvwm-menu-desktop.in',
output: 'fvwm-menu-desktop',
configuration: python_config,
install: true,
install_dir: bindir,
)

config_data = install_data('fvwm-menu-desktop-config.fpl',
install_dir: datadir + '/' + meson.project_name())

0 comments on commit 9fd99c9

Please sign in to comment.