| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 'compiled/filter/ElemHideException.cpp', | 80 'compiled/filter/ElemHideException.cpp', |
| 81 'compiled/filter/ElemHideFilter.cpp', | 81 'compiled/filter/ElemHideFilter.cpp', |
| 82 'compiled/filter/Filter.cpp', | 82 'compiled/filter/Filter.cpp', |
| 83 'compiled/filter/InvalidFilter.cpp', | 83 'compiled/filter/InvalidFilter.cpp', |
| 84 'compiled/filter/RegExpFilter.cpp', | 84 'compiled/filter/RegExpFilter.cpp', |
| 85 'compiled/filter/WhitelistFilter.cpp', | 85 'compiled/filter/WhitelistFilter.cpp', |
| 86 'compiled/storage/FilterStorage.cpp', | 86 'compiled/storage/FilterStorage.cpp', |
| 87 'compiled/subscription/DownloadableSubscription.cpp', | 87 'compiled/subscription/DownloadableSubscription.cpp', |
| 88 'compiled/subscription/Subscription.cpp', | 88 'compiled/subscription/Subscription.cpp', |
| 89 'compiled/subscription/UserDefinedSubscription.cpp', | 89 'compiled/subscription/UserDefinedSubscription.cpp', |
| 90 'compiled/Base64.cpp', | |
| 91 'compiled/ElemHide.cpp', | 90 'compiled/ElemHide.cpp', |
| 92 'compiled/ElemHideEmulation.cpp', | |
| 93 'compiled/Md5.cpp', | |
| 94 'compiled/String.cpp', | |
| 95 ] | 91 ] |
| 96 # sources specific to core | 92 # sources specific to core |
| 97 core_sources = [ | 93 core_sources = [ |
| 98 'compiled/traceInit.cpp', | 94 'compiled/traceInit.cpp', |
| 99 ] | 95 ] |
| 100 # sources for the bindings generator | 96 # sources for the bindings generator |
| 101 bindings_sources = [ | 97 bindings_sources = [ |
| 102 'compiled/bindings/generator.cpp', | 98 'compiled/bindings/generator.cpp', |
| 103 'compiled/bindings/main.cpp', | 99 'compiled/bindings/main.cpp', |
| 104 ] | 100 ] |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 input: core_objects + shared_objects, | 185 input: core_objects + shared_objects, |
| 190 output: COMPILER_OUTPUT, | 186 output: COMPILER_OUTPUT, |
| 191 depend_files: [ JS_LIBRARY ], | 187 depend_files: [ JS_LIBRARY ], |
| 192 command: [ | 188 command: [ |
| 193 emcc, '-o', output_file, | 189 emcc, '-o', output_file, |
| 194 '--post-js', bindings_output, | 190 '--post-js', bindings_output, |
| 195 '--js-library', JS_LIBRARY, | 191 '--js-library', JS_LIBRARY, |
| 196 '@INPUT@' | 192 '@INPUT@' |
| 197 ] + compiler_args + optional_args) | 193 ] + compiler_args + optional_args) |
| 198 else | 194 else |
| 199 GTEST_DIR = join_paths(meson.source_root(), 'third-party', 'googletest', 'goog letest') | 195 GTEST_DIR = join_paths('third-party', 'googletest', 'googletest') |
| 196 GTEST_PARAMS = [] | |
| 197 compiler = meson.get_compiler('cpp') | |
| 198 if compiler.has_argument('-pthread') | |
| 199 GTEST_PARAMS += '-pthread' | |
| 200 endif | |
| 200 | 201 |
| 201 test_sources = [ | 202 test_sources = [ |
| 202 'test/compiled/abptest.cpp', | 203 'test/compiled/abptest.cpp', |
| 203 'test/compiled/String.cpp', | 204 'test/compiled/String.cpp', |
| 204 'test/compiled/StringMap.cpp', | 205 'test/compiled/StringMap.cpp', |
| 206 'test/compiled/RegExp.cpp', | |
| 205 ] | 207 ] |
| 206 | 208 |
| 207 adblockpluscore = library('adblockpluscore', shared_sources, | 209 adblockpluscore = library('adblockpluscore', shared_sources, |
| 208 native_sources, | 210 native_sources, |
| 209 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, | 211 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, |
| 210 link_args: LINK_PARAMS) | 212 link_args: LINK_PARAMS) |
| 211 gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all. cc')), | 213 gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all. cc')), |
| 212 cpp_args: [ '-isystem', join_paths(GTEST_DIR, 'include' ), | 214 include_directories: [ |
|
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' ]) | 215 include_directories(join_paths(GTEST_DIR, 'include' ), is_system: true), |
| 216 include_directories(GTEST_DIR) | |
| 217 ], | |
| 218 cpp_args: GTEST_PARAMS) | |
| 214 abptest = executable('abptest', test_sources, | 219 abptest = executable('abptest', test_sources, |
| 215 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS + | 220 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, |
| 216 [ | 221 include_directories: include_directories(join_paths(GTEST _DIR, 'include')), |
| 217 '-I' + join_paths(GTEST_DIR, 'include'), | |
| 218 ], | |
| 219 link_args: LINK_PARAMS, | 222 link_args: LINK_PARAMS, |
| 220 link_with: [ adblockpluscore, gtest ]) | 223 link_with: [ adblockpluscore, gtest ]) |
| 221 test('abptest', abptest) | 224 test('abptest', abptest) |
| 222 endif | 225 endif |
| 223 | 226 |
| LEFT | RIGHT |