diff options
-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 |