Skip to content

Commit b218232

Browse files
committed
dependencies: always use a static discord lib, when using msvc
with this workaround we don't need to add __declspec() everywhere
1 parent dacd2d8 commit b218232

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/dependencies/meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,17 @@ if build_application
331331
}
332332
endif
333333

334+
c = meson.get_compiler('c')
335+
334336
discord_sdk_dep = dependency(
335337
'discord-game-sdk',
336338
required: not meson.is_cross_build(),
339+
# only with msvc we need a static library, all others work without adding __declspec() everywhere
340+
static: c.get_id() == 'msvc',
341+
#TODO: format and run mesonlint
342+
default_options : c.get_id() != 'msvc' ? {}: {
343+
'default_library':'static'
344+
}
337345
)
338346
if discord_sdk_dep.found()
339347
have_discord_sdk = true

0 commit comments

Comments
 (0)