[Windows] Add extra link arguments to build test on windows.

This commit is contained in:
Matthieu Gautier 2018-08-03 17:55:01 +02:00
parent fd9b6569af
commit bf2188af14
2 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,12 @@ conf.set('VERSION', '"@0@"'.format(meson.project_version()))
conf.set('ENABLE_CTPP2', has_ctpp2_dep)
conf.set('ENABLE_LIBARIA2', libaria2_dep.found())
if build_machine.system() == 'windows'
extra_link_args = ['-lshlwapi', '-lwinmm']
else
extra_link_args = []
endif
subdir('include')
subdir('scripts')
subdir('static')

View File

@ -10,6 +10,7 @@ gtest_dep = dependency('gtest', fallback: ['gtest', 'gtest_dep'])
foreach test_name : tests
test_exe = executable(test_name, [test_name+'.cpp'],
link_with : kiwixlib,
link_args: extra_link_args,
dependencies : all_deps + [gtest_dep],
build_rpath : '$ORIGIN')
test(test_name, test_exe)