diff options
author | Hugo Beauzée-Luyssen <hugo@videolan.org> | 2018-09-20 14:21:08 +0300 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2018-09-22 14:59:24 +0300 |
commit | 707a32a57df226e3364dcc4373fc32ae7a69af91 (patch) | |
tree | 7f2705182960064fe70088ff1c39fe9d356e2ff1 /meson.build | |
parent | e2892ffa2dd1e893d0229c5fcbe0bbbee8e11c20 (diff) |
Add & use a thread compatibility layer
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 66e2f7d..863a920 100644 --- a/meson.build +++ b/meson.build @@ -34,7 +34,10 @@ cc = meson.get_compiler('c') if not meson.is_cross_build() thread_dependency = dependency('threads') else - thread_dependency = cc.find_library('pthread') + thread_dependency = cc.find_library('pthread', required: false) +endif +if thread_dependency.found() + cdata.set('HAVE_PTHREAD_H', 1) endif dav1d_inc_dirs = include_directories(['include', 'include/dav1d']) @@ -193,6 +196,10 @@ libdav1d_sources = files( 'src/qm.c', ) +if host_machine.system() == 'windows' + libdav1d_sources += files('src/win32/thread.c') +endif + libdav1d = library('dav1d', libdav1d_sources, rev_target, version: '0.0.1', |