diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-09-15 16:51:44 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-29 20:48:58 +0000 |
commit | d2630877132edac876779ff31ae61685f09199c4 (patch) | |
tree | 507567b9d862cf521961c3b65bb8b381f194f9c6 /meson.build | |
parent | d0e4eabb4ea27fdaa469df8af17c8ed1cda50501 (diff) | |
download | mpv-d2630877132edac876779ff31ae61685f09199c4.tar.bz2 mpv-d2630877132edac876779ff31ae61685f09199c4.tar.xz |
meson: don't link pthreads when internal impl is used
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meson.build b/meson.build index fb9ebbfae6..13f2b612b6 100644 --- a/meson.build +++ b/meson.build @@ -24,7 +24,6 @@ libswresample = dependency('libswresample', version: '>= 3.9.100') libswscale = dependency('libswscale', version: '>= 5.9.100') libass = dependency('libass', version: '>= 0.12.2') -pthreads = dependency('threads') # the dependency order of libass -> ffmpeg is necessary due to # static linking symbol resolution between fontconfig and MinGW @@ -34,8 +33,7 @@ dependencies = [libass, libavformat, libavutil, libswresample, - libswscale, - pthreads] + libswscale] # Keeps track of all enabled/disabled features features = { @@ -364,6 +362,11 @@ if features['win32-internal-pthreads'] # Hack around it by using HAVE_WIN32_INTERNAL_PTHREADS. includedir += include_directories('osdep/win32/include') sources += files('osdep/win32/pthread.c') +else + # pthreads is intentionally left undefined in win32 branch to find incorrect + # uses of it immediately + pthreads = dependency('threads') + dependencies += pthreads endif pthread_debug = get_option('pthread-debug').require( |