|
| 1 | +## Copyright (C) 2021 Dirk-Jan C. Binnema <[email protected]> |
| 2 | +## |
| 3 | +## This program is free software; you can redistribute it and/or modify |
| 4 | +## it under the terms of the GNU General Public License as published by |
| 5 | +## the Free Software Foundation; either version 3 of the License, or |
| 6 | +## (at your option) any later version. |
| 7 | +## |
| 8 | +## This program is distributed in the hope that it will be useful, |
| 9 | +## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | +## GNU General Public License for more details. |
| 12 | +## |
| 13 | +## You should have received a copy of the GNU General Public License |
| 14 | +## along with this program; if not, write to the Free Software Foundation, |
| 15 | +## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 16 | + |
| 17 | + |
| 18 | +subdir('utils') |
| 19 | +subdir('index') |
| 20 | + |
| 21 | +lib_mu=static_library( |
| 22 | + 'mu', |
| 23 | + [ |
| 24 | + 'mu-bookmarks.cc', |
| 25 | + 'mu-bookmarks.hh', |
| 26 | + 'mu-contacts.cc', |
| 27 | + 'mu-contacts.hh', |
| 28 | + 'mu-data.hh', |
| 29 | + 'mu-parser.cc', |
| 30 | + 'mu-parser.hh', |
| 31 | + 'mu-query.cc', |
| 32 | + 'mu-query.hh', |
| 33 | + 'mu-query-results.hh', |
| 34 | + 'mu-query-match-deciders.cc', |
| 35 | + 'mu-query-match-deciders.hh', |
| 36 | + 'mu-query-threads.cc', |
| 37 | + 'mu-query-threads.hh', |
| 38 | + 'mu-runtime.cc', |
| 39 | + 'mu-runtime.hh', |
| 40 | + 'mu-script.cc', |
| 41 | + 'mu-script.hh', |
| 42 | + 'mu-server.cc', |
| 43 | + 'mu-server.hh', |
| 44 | + 'mu-store.cc', |
| 45 | + 'mu-store.hh', |
| 46 | + 'mu-tokenizer.cc', |
| 47 | + 'mu-tokenizer.hh', |
| 48 | + 'mu-tree.hh', |
| 49 | + 'mu-xapian.cc', |
| 50 | + 'mu-xapian.hh', |
| 51 | + 'mu-maildir.cc', |
| 52 | + 'mu-maildir.hh', |
| 53 | + 'mu-flags.cc', |
| 54 | + 'mu-flags.hh', |
| 55 | + 'mu-msg-crypto.cc', |
| 56 | + 'mu-msg-doc.cc', |
| 57 | + 'mu-msg-doc.hh', |
| 58 | + 'mu-msg-fields.c', |
| 59 | + 'mu-msg-fields.h', |
| 60 | + 'mu-msg-file.cc', |
| 61 | + 'mu-msg-file.hh', |
| 62 | + 'mu-msg-part.cc', |
| 63 | + 'mu-msg-part.hh', |
| 64 | + 'mu-msg-prio.c', |
| 65 | + 'mu-msg-prio.h', |
| 66 | + 'mu-msg-priv.hh', |
| 67 | + 'mu-msg-sexp.cc', |
| 68 | + 'mu-msg.cc', |
| 69 | + 'mu-msg.hh' |
| 70 | + ], |
| 71 | + dependencies: [ |
| 72 | + glib_dep, |
| 73 | + gio_dep, |
| 74 | + gmime_dep, |
| 75 | + xapian_dep, |
| 76 | + config_h_dep, |
| 77 | + lib_mu_utils_dep, |
| 78 | + lib_mu_index_dep |
| 79 | + ], |
| 80 | + install: false) |
| 81 | + |
| 82 | +lib_mu_dep = declare_dependency( |
| 83 | + link_with: lib_mu, |
| 84 | + include_directories: include_directories(['.', '..']) |
| 85 | +) |
| 86 | + |
| 87 | + |
| 88 | +# |
| 89 | +# tests |
| 90 | +# |
| 91 | +lib_test_mu_common_inc_dep = declare_dependency( |
| 92 | + include_directories: include_directories(['.', '..'])) |
| 93 | +lib_test_mu_common=static_library('mu-test-common', [ |
| 94 | + 'test-mu-common.cc', |
| 95 | + 'test-mu-common.hh'], |
| 96 | + dependencies: [ glib_dep, thread_dep, |
| 97 | + lib_test_mu_common_inc_dep]) |
| 98 | +lib_test_mu_common_dep=declare_dependency( |
| 99 | + link_with: lib_test_mu_common, |
| 100 | + include_directories: include_directories(['.'])) |
| 101 | + |
| 102 | + |
| 103 | +testmaildir=join_paths(meson.current_source_dir(),'.') |
| 104 | + |
| 105 | +test('test_maildir', |
| 106 | + executable('test-maildir', |
| 107 | + 'test-mu-maildir.cc', |
| 108 | + install: false, |
| 109 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) |
| 110 | +test('test_msg_fields', |
| 111 | + executable('test-msg-fields', |
| 112 | + 'test-mu-msg-fields.cc', |
| 113 | + install: false, |
| 114 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) |
| 115 | +test('test_msg', |
| 116 | + executable('test-msg', |
| 117 | + 'test-mu-msg.cc', |
| 118 | + install: false, |
| 119 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep], |
| 120 | + cpp_args:['-DMU_TESTMAILDIR2="'+ join_paths(testmaildir, 'testdir2') + '"', |
| 121 | + '-DMU_TESTMAILDIR4="'+ join_paths(testmaildir, 'testdir4') + '"' ])) |
| 122 | +test('test_store', |
| 123 | + executable('test-store', |
| 124 | + 'test-mu-store.cc', |
| 125 | + install: false, |
| 126 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep], |
| 127 | + cpp_args:['-DMU_TESTMAILDIR="'+ join_paths(testmaildir, 'testdir') + '"', |
| 128 | + '-DMU_TESTMAILDIR2="'+ join_paths(testmaildir, 'testdir2') + '"', |
| 129 | + '-DMU_TESTMAILDIR4="'+ join_paths(testmaildir, 'testdir4') + '"'])) |
| 130 | +test('test_query', |
| 131 | + executable('test-query', |
| 132 | + 'test-query.cc', |
| 133 | + install: false, |
| 134 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep], |
| 135 | + cpp_args:['-DMU_TESTMAILDIR="'+ join_paths(testmaildir, 'testdir') + '"'])) |
| 136 | +test('test_flags', |
| 137 | + executable('test-flags', |
| 138 | + 'test-mu-flags.cc', |
| 139 | + install: false, |
| 140 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) |
| 141 | + |
| 142 | +test('test_tokenizer', |
| 143 | + executable('test-tokenizer', |
| 144 | + 'test-tokenizer.cc', |
| 145 | + install: false, |
| 146 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) |
| 147 | +test('test_threads', |
| 148 | + executable('test-threads', |
| 149 | + 'mu-query-threads.cc', |
| 150 | + install: false, |
| 151 | + cpp_args: ['-DBUILD_TESTS'], |
| 152 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) |
| 153 | +test('test_contacts', |
| 154 | + executable('test-contacts', |
| 155 | + 'mu-contacts.cc', |
| 156 | + install: false, |
| 157 | + cpp_args: ['-DBUILD_TESTS'], |
| 158 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) |
| 159 | +test('test_parser', |
| 160 | + executable('test-parser', |
| 161 | + 'test-parser.cc', |
| 162 | + install: false, |
| 163 | + dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep])) |
0 commit comments