Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: meson.build

Issue 29537638: Issue 6226 - Use mesonbuild as a build system (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Left Patch Set: Cross compiling for Android on macOS works. Created April 3, 2018, 2:53 p.m.
Right Patch Set: Support NDK r16b Created April 25, 2018, 10:01 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « cross/r16b/android-x86.in ('k') | wrap_make » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 project('libadblockplus', 'cpp', default_options : ['cpp_std=c++11'], meson_vers ion: '>0.40.0') 1 project('libadblockplus', 'cpp', default_options : ['cpp_std=c++14'], meson_vers ion: '>0.40.0')
2 2
3 V8_DIR=join_paths('third_party', 'v8') 3 V8_DIR=join_paths('third_party', 'v8')
4 4
5 # 5 #
6 # A quick note about the terms. 6 # A quick note about the terms.
7 # -HOST_MACHINE is the machine we build on. 7 # -HOST_MACHINE is the machine we build on.
8 # -TARGET_MACHINE is the machine we build for (like the Android phone) 8 # -TARGET_MACHINE is the machine we build for (like the Android phone)
9 # 9 #
10 # However, meson use the GNU terms where build_machine is HOST_MACHINE, 10 # However, meson use the GNU terms where build_machine is HOST_MACHINE,
11 # host_machine is TARGET_MACHINE, and target_machine isn't relevant here 11 # host_machine is TARGET_MACHINE, and target_machine isn't relevant here
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 js_sources = custom_target('js_sources', 200 js_sources = custom_target('js_sources',
201 input: load_before_files + load_after_files + library_files, 201 input: load_before_files + load_after_files + library_files,
202 output: 'adblockplus.js.cpp', 202 output: 'adblockplus.js.cpp',
203 command: [ 'python', join_paths(meson.source_root(), 'convert_js.py'), 203 command: [ 'python', join_paths(meson.source_root(), 'convert_js.py'),
204 '@OUTPUT@', 204 '@OUTPUT@',
205 '--before', load_before_files, 205 '--before', load_before_files,
206 '--convert', library_files, 206 '--convert', library_files,
207 '--after', load_after_files ]) 207 '--after', load_after_files ])
208 208
209 CXX_FLAGS = [ '-std=c++14' ]
209 LIBRARIES = [] 210 LIBRARIES = []
210 if target_os == 'windows' 211 if target_os == 'windows'
211 LIBRARIES = [ 'shlwapi.lib', 'winhttp.lib', 'winmm.lib' ] 212 LIBRARIES = [ 'shlwapi.lib', 'winhttp.lib', 'winmm.lib' ]
213 else
214 CXX_FLAGS += '-fPIC'
215 endif
216 LD_FLAGS = []
217 if android_target
218 LD_FLAGS += '-Wl,--allow-multiple-definition'
212 endif 219 endif
213 adblockplus = shared_library('adblockplus', sources, js_sources, 220 adblockplus = shared_library('adblockplus', sources, js_sources,
214 v8_snapshot, v8_libsampler, v8_libplatform, 221 v8_snapshot, v8_libsampler, v8_libplatform,
215 include_directories: incdir, 222 include_directories: incdir,
216 cpp_args: [ '-std=c++11' ], 223 cpp_args: CXX_FLAGS,
224 link_args: LD_FLAGS,
217 link_with: LIBRARIES, 225 link_with: LIBRARIES,
218 dependencies: [ have_curl ]) 226 dependencies: [ have_curl ])
219 227
220 test_sources = files( 228 test_sources = files(
221 'test/AsyncExecutor.cpp', 229 'test/AsyncExecutor.cpp',
222 'test/BaseJsTest.h', 230 'test/BaseJsTest.h',
223 'test/BaseJsTest.cpp', 231 'test/BaseJsTest.cpp',
224 'test/AppInfoJsObject.cpp', 232 'test/AppInfoJsObject.cpp',
225 'test/ConsoleJsObject.cpp', 233 'test/ConsoleJsObject.cpp',
226 'test/DefaultFileSystem.cpp', 234 'test/DefaultFileSystem.cpp',
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 link_args: LINK_PARAMS, 268 link_args: LINK_PARAMS,
261 include_directories: [ 269 include_directories: [
262 incdir, 270 incdir,
263 include_directories(join_paths(GTEST_DIR, 'include')) 271 include_directories(join_paths(GTEST_DIR, 'include'))
264 ]) 272 ])
265 273
266 # Adjust the timeout to run the test. Default value is 30sec. 274 # Adjust the timeout to run the test. Default value is 30sec.
267 # 275 #
268 test('tests', tests, timeout: 60) 276 test('tests', tests, timeout: 60)
269 endif 277 endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld