2020-11-28 14:40:46 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2021-07-18 14:41:45 +00:00
|
|
|
project('yttui', ['cpp'], default_options: ['buildtype=release', 'cpp_std=c++17'], version: '0.1.0', license: 'MIT')
|
2020-11-28 14:08:28 +00:00
|
|
|
|
|
|
|
add_project_arguments('-Werror=return-type', language: 'cpp')
|
|
|
|
|
2020-11-28 14:42:31 +00:00
|
|
|
termpaint_dep = dependency('termpaint', static: true, version: '>=0.3.0')
|
2020-11-28 14:08:28 +00:00
|
|
|
sqlite3_dep = dependency('sqlite3')
|
|
|
|
curl_dep = dependency('libcurl')
|
2020-11-28 14:42:31 +00:00
|
|
|
json_dep = dependency('nlohmann_json', version: '>=3.5.0')
|
2020-11-28 14:08:28 +00:00
|
|
|
|
|
|
|
#ide:editable-filelist
|
2020-12-16 18:41:58 +00:00
|
|
|
application_files = [
|
|
|
|
'application.cpp',
|
2020-11-28 14:08:28 +00:00
|
|
|
'db.cpp',
|
|
|
|
'tui.cpp',
|
|
|
|
'yt.cpp',
|
|
|
|
]
|
|
|
|
|
2020-12-16 18:41:58 +00:00
|
|
|
#ide:editable-filelist
|
|
|
|
application_deps = [
|
2020-11-28 14:08:28 +00:00
|
|
|
termpaint_dep,
|
|
|
|
sqlite3_dep,
|
|
|
|
curl_dep,
|
|
|
|
json_dep
|
|
|
|
]
|
|
|
|
|
2020-12-16 18:41:58 +00:00
|
|
|
application = static_library('yttui-application', application_files, dependencies: application_deps)
|
|
|
|
|
|
|
|
tui_files = [
|
|
|
|
'yttui.cpp',
|
|
|
|
]
|
2021-07-18 14:41:45 +00:00
|
|
|
executable('yttui',
|
|
|
|
tui_files,
|
|
|
|
link_with: [application],
|
|
|
|
install: true
|
|
|
|
)
|
2020-12-20 23:00:01 +00:00
|
|
|
|
|
|
|
qt5 = import('qt5')
|
|
|
|
qt5_dep = dependency('qt5', modules: ['Core', 'Gui', 'Widgets'], required: false)
|
|
|
|
if qt5_dep.found()
|
|
|
|
kf5service_dep = dependency('KF5Service', required: false)
|
|
|
|
kf5core_dep = dependency('KF5CoreAddons', required: false)
|
|
|
|
kf5parts_dep = dependency('KF5Parts', required: false)
|
|
|
|
|
|
|
|
cppc = meson.get_compiler('cpp')
|
|
|
|
libutil_dep = cppc.find_library('util')
|
|
|
|
|
|
|
|
moc_files = qt5.preprocess(moc_sources: ['yttui-qt5.cpp'], qresources: ['yttui-qt5.qrc'])
|
|
|
|
|
|
|
|
executable('yttui-qt5',
|
|
|
|
['yttui-qt5.cpp', moc_files],
|
|
|
|
link_with: [application],
|
|
|
|
dependencies: [libutil_dep, qt5_dep, kf5service_dep, kf5core_dep, kf5parts_dep],
|
|
|
|
install: true
|
|
|
|
)
|
|
|
|
endif
|