~tristan957/harvest-almanac

ref: 0f0fa7109d3fb40354c03f4ba0fcda63df8280e4 harvest-almanac/harvest-almanac/meson.build -rw-r--r-- 1.7 KiB
0f0fa710Tristan Partin harvest-glib: fix implicit fallthrough 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
harvest_almanac_version = '1.0.0'

harvest_almanac_config_h = configuration_data({
    'package_name': 'Harvest Almanac',
    'package_version': harvest_almanac_version,
    'package_license': 'GTK_LICENSE_GPL_3_0_ONLY',
    'package_website': 'https://git.sr.ht/~tristan957/harvest-almanac',
    'package_website_label': 'Repository',
    'gettext_package': 'meson.project_name()',
    'localedir': join_paths(get_option('prefix'), get_option('localedir')),
    'libdir': join_paths(get_option('prefix'), get_option('libdir')),
})

configure_file(
    input: 'config.h.in',
    output: 'config.h',
    configuration: harvest_almanac_config_h,
)

harvest_almanac_sources = [
    'main.c',
    'hal-application.c',
    'hal-context.c',
    'hal-preferences-window.c',
    'hal-profile.c',
    'hal-time-entry.c',
    'hal-time-tracker.c',
    'hal-window.c',
]

harvest_almanac_c_args = [
    '-DHANDY_USE_UNSTABLE_API',
    '-DG_LOG_DOMAIN="harvest-almanac"',
]

if not get_option('use-system-harvest-glib')
    harvest_almanac_c_args += [
        '-I' + join_paths(meson.current_source_dir(), '..', 'harvest-glib'),
    ]
endif

if get_option('buildtype') == 'release'
    harvest_almanac_c_args += [
        '-DG_DISABLE_ASSERT',
        '-DG_DISABLE_CHECKS',
        '-DG_DISABLE_CAST_CHECKS',
    ]
elif get_option('buildtype').startswith('debug')
    harvest_almanac_c_args += [
        '-DG_ENABLE_DEBUG',
    ]
endif

harvest_almanac_dependencies = [
    libgtk_dep,
    libhandy_dep,
    libsecret_dep,
    libsoup_dep,
    harvest_glib_dep,
]

executable(
    'harvest-almanac',
    harvest_almanac_sources + harvest_almanac_resources,
    c_args: harvest_almanac_c_args,
    dependencies: harvest_almanac_dependencies,
    gui_app: true,
    install: true,
)