aboutsummaryrefslogtreecommitdiffhomepage
path: root/meson.build
diff options
context:
space:
mode:
authorBob Tolbert <bob@eyesopen.com>2025-03-10 10:13:36 -0500
committerBob Tolbert <bob@eyesopen.com>2025-03-10 10:13:36 -0500
commita15916ec9cc44554b3d8a7f9171433498b33a23d (patch)
tree1a643e52dcb0c6e69ddabc7fb5f911ce97ba9aab /meson.build
parentFix defdyn in flychecking. (diff)
Update Makefile and meson to build with msys2 gcc and clang
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 11 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 30591166..a9b41f97 100644
--- a/meson.build
+++ b/meson.build
@@ -39,6 +39,15 @@ native_thread_dep = dependency('threads', native : true)
# Deps
m_dep = cc.find_library('m', required : false)
dl_dep = cc.find_library('dl', required : false)
+
+# for MINGW/MSYS2
+native_ws2_dep = native_cc.find_library('ws2_32', required: false)
+native_psapi_dep = native_cc.find_library('psapi', required: false)
+native_wsock_dep = native_cc.find_library('wsock32', required: false)
+ws2_dep = cc.find_library('ws2_32', required: false)
+psapi_dep = cc.find_library('psapi', required: false)
+wsock_dep = cc.find_library('wsock32', required: false)
+
android_spawn_dep = cc.find_library('android-spawn', required : false)
thread_dep = dependency('threads')
@@ -173,8 +182,8 @@ mainclient_src = [
'src/mainclient/shell.c'
]
-janet_dependencies = [m_dep, dl_dep, android_spawn_dep]
-janet_native_dependencies = [native_m_dep, native_dl_dep, native_android_spawn_dep]
+janet_dependencies = [m_dep, dl_dep, android_spawn_dep, ws2_dep, psapi_dep, wsock_dep]
+janet_native_dependencies = [native_m_dep, native_dl_dep, native_android_spawn_dep, native_ws2_dep, native_psapi_dep, native_wsock_dep]
if not get_option('single_threaded')
janet_dependencies += thread_dep
janet_native_dependencies += native_thread_dep