projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for building tinc with MSVC
[tinc]
/
src
/
mingw
/
meson.build
diff --git
a/src/mingw/meson.build
b/src/mingw/meson.build
index
796d62b
..
5cd2c7b
100644
(file)
--- 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
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')
endforeach
src_tincd += files('device.c')