diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-20 13:29:06 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-21 20:14:58 +0300 |
commit | 8d484d153dd054be89be51b7b4e9815450c0065a (patch) | |
tree | 44a4c1045969909197312003957611f90d9be582 /subprojects/plugin_hostlist/meson.build | |
parent | Add plugin loading code to smolblok (diff) | |
download | smolbote-8d484d153dd054be89be51b7b4e9815450c0065a.tar.xz |
Move staging/hostlist to subprojects/plugin_hostlist
Diffstat (limited to 'subprojects/plugin_hostlist/meson.build')
-rw-r--r-- | subprojects/plugin_hostlist/meson.build | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/subprojects/plugin_hostlist/meson.build b/subprojects/plugin_hostlist/meson.build new file mode 100644 index 0000000..d8286d1 --- /dev/null +++ b/subprojects/plugin_hostlist/meson.build @@ -0,0 +1,43 @@ +project('hostlistfilter', 'cpp') + +mod_qt5 = import('qt5') +dep_qt5 = dependency('qt5', + modules: [ 'Core', 'Network', 'WebEngineWidgets' ], + include_type: 'system' +) +dep_catch = dependency('catch2', required: true, fallback: ['catch2', 'catch2_dep'] ) + +smolbote_interface = include_directories(get_option('interface')) +message(get_option('interface')) + +lib_hostlistfilter = static_library('hostlistfilter', + [ 'filterlist.cpp' ], + include_directories: smolbote_interface, + dependencies: [dep_qt5] +) + +dep_hostlistfilter = declare_dependency( + include_directories: [ '.', smolbote_interface ], + link_with: lib_hostlistfilter +) + +# plugin +plugin = shared_library('smolblokHostlistPlugin', + [ 'plugin/plugin.cpp', + mod_qt5.preprocess(include_directories: smolbote_interface, moc_headers: 'plugin/plugin.h', dependencies: dep_qt5) ], + include_directories: smolbote_interface, + dependencies: [ dep_hostlistfilter, dep_qt5 ], + install: true, + install_dir: get_option('libdir')/'smolbote/plugins' +) + +# tests +test('rule parsing', executable('rule', + sources: 'test/rule.cpp', + dependencies: [dep_qt5, dep_catch, dep_hostlistfilter])) + +test('filterlist', executable('filterlist', + sources: 'test/filterlist.cpp', + dependencies: [dep_qt5, dep_catch, dep_hostlistfilter]), + env: 'HOSTLIST_TXT='+meson.current_source_dir()/'test/hostlist.txt' +) |