win32: build static library

Fixes linker failure on test/run_output.exe
This commit is contained in:
Max Kellermann 2021-03-05 13:25:24 +01:00
parent c962a6be76
commit 54c1794cee
3 changed files with 19 additions and 1 deletions

View File

@ -322,7 +322,6 @@ sources = [
if is_windows
sources += [
'src/win32/Win32Main.cxx',
'src/win32/ComWorker.cxx',
]
endif
@ -360,6 +359,7 @@ subdir('src/system')
subdir('src/thread')
subdir('src/net')
subdir('src/event')
subdir('src/win32')
subdir('src/apple')

View File

@ -141,6 +141,7 @@ if is_windows
wasapi_dep = [
c_compiler.find_library('ksuser', required: true),
c_compiler.find_library('ole32', required: true),
win32_dep,
]
else
wasapi_dep = dependency('', required: false)

17
src/win32/meson.build Normal file
View File

@ -0,0 +1,17 @@
if not is_windows
win32_dep = declare_dependency('', required: false)
subdir_done()
endif
win32 = static_library(
'win32',
'ComWorker.cxx',
include_directories: inc,
)
win32_dep = declare_dependency(
link_with: win32,
dependencies: [
thread_dep,
],
)