aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-23 17:30:18 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-23 17:30:18 +0200
commit4a226dc94f03a8bc262c537263ad536306897c48 (patch)
treeb738cfbbc0e9067deb2886bfec10ddca4b36e3f3
parentFix breakpad integration (diff)
downloadsmolbote-4a226dc94f03a8bc262c537263ad536306897c48.tar.xz
Fix plasma dependency
-rw-r--r--meson.build16
-rw-r--r--src/meson.build18
2 files changed, 23 insertions, 11 deletions
diff --git a/meson.build b/meson.build
index 9d4c661..07ca78f 100644
--- a/meson.build
+++ b/meson.build
@@ -11,10 +11,18 @@ dep_qt5 = dependency('qt5', modules: ['Core', 'Network', 'Widgets', 'WebEngineWi
dep_boost = dependency('boost', modules: ['program_options'])
# Breakpad
-dep_breakpad = dependency('breakpad-client', required : get_option('Breakpad'))
-if dep_breakpad.found()
- dep_thread = dependency('threads')
-endif
+dep_breakpad = declare_dependency(
+ compile_args: '-DBreakpadEnabled',
+ dependencies: [dependency('breakpad-client', required: get_option('Breakpad')), dependency('threads', required: get_option('Breakpad'))]
+)
+
+# KDE
+dep_plasma = declare_dependency(
+ compile_args: '-DPLASMA',
+ dependencies: [meson.get_compiler('cpp').find_library('KF5WindowSystem', required: get_option('Plasma')),
+ meson.get_compiler('cpp').find_library('KF5Wallet', required: get_option('Plasma'))],
+ include_directories: [include_directories('/usr/include/KF5/KWindowSystem'), include_directories('/usr/include/KF5/KWallet')]
+)
# Generate config header
include = include_directories('include')
diff --git a/src/meson.build b/src/meson.build
index 0af2be0..99231d2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -9,14 +9,18 @@ poi_moc = qt5.preprocess(
dependencies: dep_qt5
)
-features = []
-if dep_breakpad.found()
- features += '-DBreakpadEnabled'
+optdepends = []
+if get_option('Breakpad').enabled()
+ optdepends += dep_breakpad
+endif
+
+if get_option('Plasma').enabled()
+ optdepends += dep_plasma
endif
poi = executable('poi', install: true,
- cpp_args: ['-DQAPPLICATION_CLASS=QApplication', features],
- dependencies: [dep_qt5, dep_boost, dep_breakpad, dep_thread, dep_SingleApplication,
+ cpp_args: ['-DQAPPLICATION_CLASS=QApplication'],
+ dependencies: [dep_qt5, dep_boost, dep_SingleApplication, optdepends,
dep_about, dep_addressbar, dep_bookmarks, dep_configuration, dep_downloads, dep_urlfilter, dep_web],
include_directories: [include, genheader_inc],
sources: ['main.cpp', poi_moc,
@@ -31,12 +35,12 @@ poi = executable('poi', install: true,
'subwindow/subwindow.cpp',
'subwindow/tabwidget.cpp',
-
+
'webengine/filter.cpp',
'webengine/urlinterceptor.cpp',
'webengine/webpage.cpp',
'webengine/webview.cpp',
-
+
'wallet/wallet.cpp', 'wallet/wallet.h']
)