This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
43 lines (34 loc) · 1.76 KB
/
meson.build
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
project('Kirigami64', 'cpp', version: '0.3.0' + (not get_option('buildtype').startswith('release') ? '-' + run_command('git', 'rev-parse', '--short', 'HEAD', check: true).stdout().strip() : ''),
default_options: ['cpp_std=c++17'], meson_version: '>=1.1.0')
# Setup: configure file
config_dat = configuration_data()
config_dat.set('PROJECT_NAME', 'Kirigami64')
config_dat.set('PROJECT_VERSION', meson.project_version())
config_dat.set('PROJECT_VERSION_SUBTITLE', 'Jolly Roger Bay')
if get_option('FLATPAK')
config_dat.set('FLATPAK_STATE', '1')
else
config_dat.set('FLATPAK_STATE', '0')
endif
configure_file(input: 'src/config.in.hpp', output: 'config.hpp', configuration: config_dat)
# Setup: library dependencies
qt6dep = dependency('qt6', modules : ['Core', 'Qml', 'Quick', 'Gui', 'QuickControls2', 'Widgets', 'Xml'], version : '>=6.5.0')
kf6dep = dependency('KF6CoreAddons', version : '>=5.246.0')
kf6kirigamidep = dependency('KF6Kirigami2', version : '>=5.246.0')
kf6translatedep = dependency('KF6I18n', version : '>=5.246.0')
kf6configdep = dependency('KF6Config', modules: ['KF6::ConfigCore', 'KF6::ConfigGui'], version : '>=5.246.0', method: 'cmake')
lgit2 = dependency('libgit2', version : '>=1.1.0')
#lgit2 = meson.get_compiler('cpp').find_library('git2')
libs = [qt6dep, kf6dep, kf6kirigamidep, kf6translatedep, kf6configdep, lgit2]
# Setup: Qt Module
qt6 = import('qt6')
# Files
sources = files('src/about.cpp', 'src/backend.cpp', 'src/main.cpp')
headers = files('src/about.hpp', 'src/backend.hpp')
# Qt shenanigans
resources = qt6.preprocess(
qresources : ['src/resources.qrc'],
moc_headers : headers,
dependencies: libs)
# The application
executable('Kirigami64', sources, resources, include_directories: ['/usr/include/KF6/KConfigCore'] , dependencies: libs)