diff --git a/meson.build b/meson.build index d72da267e..321615704 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/src/output/plugins/meson.build b/src/output/plugins/meson.build index 8d48674ae..53c92b9f4 100644 --- a/src/output/plugins/meson.build +++ b/src/output/plugins/meson.build @@ -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) diff --git a/src/win32/meson.build b/src/win32/meson.build new file mode 100644 index 000000000..4d70e3861 --- /dev/null +++ b/src/win32/meson.build @@ -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, + ], +)