Index: meson.build |
=================================================================== |
--- a/meson.build |
+++ b/meson.build |
@@ -191,14 +191,33 @@ |
depend_files: [ JS_LIBRARY ], |
command: [ |
emcc, '-o', output_file, |
'--post-js', bindings_output, |
'--js-library', JS_LIBRARY, |
'@INPUT@' |
] + compiler_args + optional_args) |
else |
+ GTEST_DIR = join_paths(meson.source_root(), 'third-party', 'googletest', 'googletest') |
+ |
+ test_sources = [ |
+ 'test/compiled/abptest.cpp', |
+ 'test/compiled/String.cpp', |
+ 'test/compiled/StringMap.cpp', |
+ ] |
+ |
adblockpluscore = library('adblockpluscore', shared_sources, |
native_sources, |
cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, |
link_args: LINK_PARAMS) |
+ gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all.cc')), |
+ 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
|
+ '-I' + GTEST_DIR, '-pthread' ]) |
+ abptest = executable('abptest', test_sources, |
+ cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS + |
+ [ |
+ '-I' + join_paths(GTEST_DIR, 'include'), |
+ ], |
+ link_args: LINK_PARAMS, |
+ link_with: [ adblockpluscore, gtest ]) |
+ test('abptest', abptest) |
endif |