X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fmingw%2Fmeson.build;h=5cd2c7bab6bab2c2c999fbb2ca2cabe63e954a0f;hb=cfc9fee931c70554353ce6c4acc3407baac08745;hp=796d62b9369f705f3019d78267e8fae077a05aba;hpb=08f1e0cd33812f9d972dd7c59021443a8d02d0e0;p=tinc diff --git a/src/mingw/meson.build b/src/mingw/meson.build index 796d62b9..5cd2c7ba 100644 --- a/src/mingw/meson.build +++ b/src/mingw/meson.build @@ -1,11 +1,17 @@ -win_common_libs = ['ws2_32', 'iphlpapi', 'winpthread'] +check_headers += 'w32api.h' -if opt_harden +win_common_libs = ['ws2_32', 'iphlpapi', 'threads'] + +if opt_harden and cc_name != 'msvc' win_common_libs += 'ssp' endif foreach libname : win_common_libs - deps_common += cc.find_library(libname) + dep = dependency(libname, required: false) + if not dep.found() + dep = cc.find_library(libname) + endif + deps_common += dep endforeach src_tincd += files('device.c')