Left: | ||
Right: |
OLD | NEW |
---|---|
1 project('adblockpluscore', 'cpp', license: ['GPL3'], meson_version: '>0.40.0') | 1 project('adblockpluscore', 'cpp', license: ['GPL3'], meson_version: '>0.40.0') |
2 | 2 |
3 native = get_option('native') | 3 native = get_option('native') |
4 if native | 4 if native |
5 target_type='native' | 5 target_type='native' |
6 else | 6 else |
7 target_type='js' | 7 target_type='js' |
8 endif | 8 endif |
9 | 9 |
10 if target_type == 'js' | 10 if target_type == 'js' |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 input: core_objects + shared_objects, | 189 input: core_objects + shared_objects, |
190 output: COMPILER_OUTPUT, | 190 output: COMPILER_OUTPUT, |
191 depend_files: [ JS_LIBRARY ], | 191 depend_files: [ JS_LIBRARY ], |
192 command: [ | 192 command: [ |
193 emcc, '-o', output_file, | 193 emcc, '-o', output_file, |
194 '--post-js', bindings_output, | 194 '--post-js', bindings_output, |
195 '--js-library', JS_LIBRARY, | 195 '--js-library', JS_LIBRARY, |
196 '@INPUT@' | 196 '@INPUT@' |
197 ] + compiler_args + optional_args) | 197 ] + compiler_args + optional_args) |
198 else | 198 else |
199 GTEST_DIR = join_paths(meson.source_root(), 'third-party', 'googletest', 'goog letest') | |
200 | |
201 test_sources = [ | |
202 'test/compiled/abptest.cpp', | |
203 'test/compiled/String.cpp', | |
204 'test/compiled/StringMap.cpp', | |
205 ] | |
206 | |
199 adblockpluscore = library('adblockpluscore', shared_sources, | 207 adblockpluscore = library('adblockpluscore', shared_sources, |
200 native_sources, | 208 native_sources, |
201 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, | 209 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, |
202 link_args: LINK_PARAMS) | 210 link_args: LINK_PARAMS) |
211 gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all. cc')), | |
212 cpp_args: [ '-isystem', join_paths(GTEST_DIR, 'include' ), | |
sergei
2018/01/26 22:13:36
I'm afraid isystem is not supported on windows, bu
hub
2018/01/27 03:33:37
I have reworked this part. I use the meson syntax
| |
213 '-I' + GTEST_DIR, '-pthread' ]) | |
214 abptest = executable('abptest', test_sources, | |
215 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS + | |
216 [ | |
217 '-I' + join_paths(GTEST_DIR, 'include'), | |
218 ], | |
219 link_args: LINK_PARAMS, | |
220 link_with: [ adblockpluscore, gtest ]) | |
221 test('abptest', abptest) | |
203 endif | 222 endif |
204 | 223 |
OLD | NEW |