| 1 |
## SPDX-License-Identifier: GPL-2.0-only |
| 2 |
|
| 3 |
# Documentation: https://mesonbuild.com/Qt5-module.html |
| 4 |
qt5 = import('qt5') |
| 5 |
qt5_dep = dependency('qt5', modules : ['Core', 'Widgets', 'Svg']) |
| 6 |
yamlcpp_dep = dependency('yaml-cpp', version: '>= 0.5.1', required: true) |
| 7 |
|
| 8 |
# TODO: Translations |
| 9 |
# lang_cpp = qt5.compile_translations(qresource: 'lang.qrc') |
| 10 |
|
| 11 |
generated_files = qt5.preprocess( |
| 12 |
moc_headers : ['MainWindow.h', 'AboutDialog.h', 'ToggleSwitch.h'], |
| 13 |
ui_files : ['MainWindow.ui', 'AboutDialog.ui'], |
| 14 |
dependencies : [qt5_dep], |
| 15 |
qresources : ['resources.qrc'], |
| 16 |
) |
| 17 |
|
| 18 |
mock = get_option('mock') |
| 19 |
|
| 20 |
if mock |
| 21 |
add_project_arguments('-DMOCK', language : 'cpp') |
| 22 |
endif |
| 23 |
|
| 24 |
executable('coreboot-configurator', |
| 25 |
'main.cpp', |
| 26 |
'MainWindow.cpp', |
| 27 |
'AboutDialog.cpp', |
| 28 |
'Configuration.cpp', |
| 29 |
'ToggleSwitch.cpp', |
| 30 |
'NvramToolCli.cpp', |
| 31 |
# lang_cpp, |
| 32 |
generated_files, |
| 33 |
dependencies : [qt5_dep, yamlcpp_dep], |
| 34 |
install : true |
| 35 |
) |