diff options
author | Hugo Beauzée-Luyssen <hugo@videolan.org> | 2018-09-27 10:51:40 +0300 |
---|---|---|
committer | Hugo Beauzée-Luyssen <hugo@videolan.org> | 2018-09-27 13:51:17 +0300 |
commit | 09b05ff2658e6542304eb396503a899ea1c3c4c7 (patch) | |
tree | 545189998526b7e4e35e5a25a89f6893173ac225 /meson.build | |
parent | 11e93ea529505507f325b392840ddbcbc6836873 (diff) |
meson: Don't probe for pthread on windows
Always use the compatibility layer.
Fix #28
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 506c4d5..d42b3a1 100644 --- a/meson.build +++ b/meson.build @@ -32,10 +32,11 @@ cdata = configuration_data() cdata_asm = configuration_data() cc = meson.get_compiler('c') -if not meson.is_cross_build() +# On windows, we use a compatibility layer to emulate pthread +if host_machine.system() != 'windows' thread_dependency = dependency('threads') else - thread_dependency = cc.find_library('pthread', required: false) + thread_dependency = declare_dependency(sources: ['src/win32/thread.c']) endif dav1d_inc_dirs = include_directories(['include', 'include/dav1d']) @@ -264,10 +265,6 @@ else nasm_objs = [] endif -if host_machine.system() == 'windows' - libdav1d_sources += files('src/win32/thread.c') -endif - # Build a helper library for each bitdepth bitdepth_objs = [] foreach bitdepth : dav1d_bitdepths |