win32: Fix meson build system for Windows.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
This commit is contained in:
Edward Lee 2020-10-01 10:24:40 -04:00 committed by Arun Raghavan
parent 7bc559fe26
commit b892e327a9
7 changed files with 127 additions and 55 deletions

View file

@ -39,7 +39,6 @@ libpulsecommon_sources = [
'pulsecore/memblock.c',
'pulsecore/memblockq.c',
'pulsecore/memchunk.c',
'pulsecore/mutex-posix.c',
'pulsecore/native-common.c',
'pulsecore/once.c',
'pulsecore/packet.c',
@ -56,7 +55,6 @@ libpulsecommon_sources = [
'pulsecore/random.c',
'pulsecore/srbchannel.c',
'pulsecore/sample-util.c',
'pulsecore/semaphore-posix.c',
'pulsecore/shm.c',
'pulsecore/bitset.c',
'pulsecore/socket-client.c',
@ -65,7 +63,6 @@ libpulsecommon_sources = [
'pulsecore/strbuf.c',
'pulsecore/strlist.c',
'pulsecore/tagstruct.c',
'pulsecore/thread-posix.c',
'pulsecore/time-smoother.c',
'pulsecore/tokenizer.c',
'pulsecore/usergroup.c',
@ -177,6 +174,20 @@ if x11_dep.found()
endif
# FIXME: Do non-POSIX thread things
if host_machine.system() == 'windows'
libpulsecommon_sources += [
'pulsecore/mutex-win32.c',
'pulsecore/poll-win32.c',
'pulsecore/semaphore-win32.c',
'pulsecore/thread-win32.c',
]
else
libpulsecommon_sources += [
'pulsecore/mutex-posix.c',
'pulsecore/semaphore-posix.c',
'pulsecore/thread-posix.c'
]
endif
# FIXME: Do SIMD things
libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
@ -190,6 +201,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
dependencies : [
libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep, libintl_dep,
platform_dep, platform_socket_dep,
],
implicit_include_directories : false)