| 1 |
project('gtkmm exampleapp', 'c', 'cpp', |
| 2 |
version: '0.0.0', |
| 3 |
default_options: [ |
| 4 |
'cpp_std=c++17' |
| 5 |
] |
| 6 |
) |
| 7 |
|
| 8 |
gnome = import('gnome') |
| 9 |
gtkmm_dep = dependency('gtkmm-4.0') |
| 10 |
|
| 11 |
program_name = 'exampleapp' |
| 12 |
|
| 13 |
cpp_sources = [ |
| 14 |
'main.cc', |
| 15 |
'exampleappwindow.cc', |
| 16 |
'exampleapplication.cc', |
| 17 |
] |
| 18 |
|
| 19 |
resources = gnome.compile_resources('resources', |
| 20 |
'exampleapp.gresource.xml', |
| 21 |
source_dir: '.') |
| 22 |
executable(program_name, |
| 23 |
cpp_sources, resources, |
| 24 |
dependencies: gtkmm_dep, |
| 25 |
win_subsystem: 'windows', |
| 26 |
) |
| 27 |
|
| 28 |
python3 = import('python').find_installation() |
| 29 |
source_step1_dir = meson.current_source_dir() / '..' / 'step1' |
| 30 |
install_cmd = source_step1_dir / 'install-cmd.py' |
| 31 |
|
| 32 |
conf_data = configuration_data() |
| 33 |
conf_data.set('bindir', meson.current_build_dir()) |
| 34 |
desktop_file = configure_file( |
| 35 |
input: '..' / 'step1' / 'exampleapp.desktop.in', |
| 36 |
output: '@BASENAME@', |
| 37 |
configuration: conf_data, |
| 38 |
) |
| 39 |
|
| 40 |
run_target('install-desktop-file', |
| 41 |
command: [ |
| 42 |
python3, install_cmd, 'desktop', |
| 43 |
program_name, |
| 44 |
desktop_file, |
| 45 |
source_step1_dir / 'exampleapp.png', |
| 46 |
] |
| 47 |
) |