Debian Codegraph @

examples/book/buildapp/step6/meson.build

raw
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 'exampleappprefs.cc',
18 ]
19
20 resources = gnome.compile_resources('resources',
21 'exampleapp.gresource.xml',
22 source_dir: '.')
23 schemas = gnome.compile_schemas(depend_files: 'org.gtkmm.exampleapp.gschema.xml')
24
25 executable(program_name,
26 cpp_sources, resources, schemas,
27 dependencies: gtkmm_dep,
28 win_subsystem: 'windows',
29 )
30
31 python3 = import('python').find_installation()
32 source_step1_dir = meson.current_source_dir() / '..' / 'step1'
33 install_cmd = source_step1_dir / 'install-cmd.py'
34
35 conf_data = configuration_data()
36 conf_data.set('bindir', meson.current_build_dir())
37 desktop_file = configure_file(
38 input: '..' / 'step1' / 'exampleapp.desktop.in',
39 output: '@BASENAME@',
40 configuration: conf_data,
41 )
42
43 run_target('install-desktop-file',
44 command: [
45 python3, install_cmd, 'desktop',
46 program_name,
47 desktop_file,
48 source_step1_dir / 'exampleapp.png',
49 ]
50 )
51
52 run_target('install-gschema-file',
53 command: [
54 python3, install_cmd, 'gschema',
55 meson.current_source_dir() / 'org.gtkmm.exampleapp.gschema.xml',
56 ]
57 )