diff --git a/meson.build b/meson.build index ec51e6ef2..43f87846b 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/test/meson.build b/test/meson.build index 9accb6562..9d29177fe 100644 --- a/test/meson.build +++ b/test/meson.build @@ -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)